Kaynağa Gözat

Merge pull request #5708 from blink1073/jest-instructions

Document Running Jest Tests
Saul Shanabrook 6 yıl önce
ebeveyn
işleme
b2eb68a66b
2 değiştirilmiş dosya ile 11 ekleme ve 5 silme
  1. 11 1
      CONTRIBUTING.md
  2. 0 4
      yarn.lock

+ 11 - 1
CONTRIBUTING.md

@@ -155,10 +155,13 @@ cd tests/test-notebook
 jlpm test
 ```
 
+Note: We are in the process of changing our test suite over to use `jest`. For folders
+that have a `jest.conf.js` file, please see the `jest` specific instructions below.
+
 You can also select specific test file(s) to run using a pattern:
 
 ```bash
-cd tests/test-console
+cd tests/test-notebook
 jlpm test --pattern=src/*.spec.ts
 jlpm test --pattern=src/history.spec.ts
 ```
@@ -186,6 +189,13 @@ command, where `<package-directory-name>` is the name of the folder in
 jlpm create:test <package-directory-name>
 ```
 
+#### Running Jest Tests
+
+For those test folders that use `jest`, they can be run as `jlpm test` to run the files
+directly. You can also use `jlpm test --namePattern=<regex>` to specify specific test
+suite names, and `jlpm test --pathPattern=<regex>` to specify specific test module names. In order to watch the code, add a `debugger` line in your code and run `jlpm watch`. This will start a node V8 debugger, which can be debugged
+in Chrome by browsing to `chrome://inspect/` and launching the remote session.
+
 ### Build and run the stand-alone examples
 
 To install and build the examples in the `examples` directory:

+ 0 - 4
yarn.lock

@@ -763,10 +763,6 @@
   version "8.0.58"
   resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90"
 
-"@types/node@^10.12.10":
-  version "10.12.10"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.10.tgz#4fa76e6598b7de3f0cb6ec3abacc4f59e5b3a2ce"
-
 "@types/prop-types@*":
   version "15.5.5"
   resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.5.tgz#17038dd322c2325f5da650a94d5f9974943625e3"