Commit Graph

3 Commits

Author SHA1 Message Date
Rob Wu 7ff6e8a1dc chore: Stop swallowing errors in .sh tests
The Bash shell scripts ignored errors in all but the last line.
This commit adds `set -eo pipefail` to fix the issue:

`set -e` causes the script to exit as soon as any command exits with a
non-zero exit code. When pipes are used, this flag only applies to the
last command in a pipe. The `set -o pipefail` option ensures that the
script is also exited with a non-zero exit code when any command in the
pipe fails.
2018-06-20 15:29:03 +02:00
ExE Boss c0bf94f2eb chore: Fix the `\n` character preceding `echo` output in shell scripts (#136) 2018-06-20 00:33:12 +02:00
Luca Greco 5d186bae84 test(browsers-smoketests): Run a set of smoke tests on both Chrome and Firefox
This commit introduces tape as the test framework used to define the tests in the
test extension contexts and send them to the nodejs script that orchestrate the
test run.

The nodejs script has also been migrated from mocha to tape, it uses the custom test
helpers provided to setup the test environment (e.g. create a temporary dir
for the test extension, copy the last polyfill build, bundle tape to be used
in the test extension, start the browser which run the test extension
and finally collect the results of the test extension) and then it merges all the
tap logs collected from every test extension into a single "per browser" test suite.

- updated travis nodejs environment to nodejs 8
- uses tape to collect test results from inside the test extension
- added test case to check polyfill 'existing browser API object' detection
- added test for expected rejection on tabs.sendMessage with an invalid tabId
- added test with multiple listeners which resolves to undefined and null
- optionally run chrome smoketests with --enable-features=NativeCrxBindings
2018-06-02 20:59:46 +02:00