Luca Greco
0517edaa67
fix: refactor runtime.onMessage tests.
2016-11-07 16:34:34 +01:00
Luca Greco
3842bd1693
style: destructure the assert methods to globals
2016-11-07 16:34:34 +01:00
Luca Greco
2853e98546
fix: the test jsdom window doesn't need to be in the shared global.
2016-11-07 16:34:34 +01:00
Luca Greco
6cca044a5c
test: add more test cases to reach a full code coverage.
...
- if the a browser global already exists, it should not be overridden
- use Object.defineProperty on the wrapped browser global
(and test "has" for cached properties)
- delete a property defined with Object.defineProperty
- methods that are not wrapped are proxied correctly
- the special onMessage wrapper should not wrap a listener that is not
a function
- test that a returned rejected Promise on the onMessage listener
is turned in the parameter of the sendResponse callback
2016-11-07 16:34:34 +01:00
Luca Greco
92ccea2e15
test: tweaks on test helpers (support for 'existent browser global' test).
2016-11-07 16:34:34 +01:00
Luca Greco
a585b4b07a
test: added test case for async function rejection, and arguments length validation.
2016-11-07 16:34:34 +01:00
Luca Greco
7a247f56f2
test: tweak the proxied properties tests.
2016-11-07 16:34:34 +01:00
Luca Greco
a1469d6f17
fix: added inline comments to special runtime.onMessage wrapper tests.
2016-11-07 16:34:34 +01:00
Luca Greco
f28858961f
fix: cleanup async function tests and other minor tweaks on tests.
2016-11-07 16:34:34 +01:00
Luca Greco
b0a111cdc7
fix: init fake runtime.lastError to null.
2016-11-07 16:34:34 +01:00
Luca Greco
88e3728c46
fix: removed unused import in test file.
2016-11-07 16:34:34 +01:00
Luca Greco
aaca860c2d
fix: cleanup tests setup function.
2016-11-07 16:34:34 +01:00
Luca Greco
f2c82fcbea
fix: relax max-nested-callback eslint rules for tests.
2016-11-07 16:34:34 +01:00
Luca Greco
c08b8af982
test: introduced a test suite for unit testing.
2016-11-07 16:33:42 +01:00