forked from duckduckgo/duckduckgo-privacy-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate legacy reference test to node test runner (duckduckgo#2118)
* PoC: running tests in node * Move cookie reference tests to the node runner * Port fingerprinting-protection-test * Port https-upgrades-tests * Port privacy-configuration-tests * Add node-tests to npm test * Tidy dead code * Add a readme. * Bump reference tests * Bump content-scope-scripts * Move https-upgrades-tests to the browser test runner * Bump content-scope-scripts
- Loading branch information
1 parent
4426bea
commit d2646f5
Showing
11 changed files
with
245 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Unit tests | ||
|
||
This folder contains unit-tests, which test individual components and functions in the source code. These tests | ||
are written using the [Jasmine](https://jasmine.github.io/) testing framework. | ||
Tests are bundled with `esbuild` (with the exception of tests in the `legacy` folder, which still use `browserify`), then run in one of two test environments: | ||
1. Node: these tests run in a plain node process. Tests placed in the `node` folder will be run in this environment. | ||
2. Browser: the rest of the tests are run in a headless chrome browser (using `karma`'s test runner). | ||
|
||
## Running tests | ||
|
||
Tests can be run as follows: | ||
- `npm test`: Run all tests (both node and browser). | ||
- `npm test.unit`: Run only browser-based unit tests. | ||
- `npm test.node`: Run only node-based unit tests. |
Oops, something went wrong.