Skip to content

Commit 72b8636

Browse files
committed
Enables Deno specific tests in Core
Core features which are environment dependent will need to be implemented. For testing this features, environment dependent tests need to be setup. The `deno` tests can be run by `npm run test::deno` and they need to be located under `./packages/core/test/deno`. The testkit pipeline is configured to run these tests only when configured for test `deno`.
1 parent 93c0a16 commit 72b8636

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"build::notci": "lerna bootstrap",
4545
"docs": "lerna run docs --stream --concurrency 1",
4646
"test::unit": "lerna run test::unit --stream",
47+
"test::deno": "lerna run test::deno --stream",
4748
"test::integration": "lerna run test::integration --stream",
4849
"test::browser": "lerna run test::browser --stream",
4950
"test::stress": "lerna run test::stress --stream",

packages/core/jest.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ export default {
152152
// ],
153153

154154
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
155-
// testPathIgnorePatterns: [
156-
// "/node_modules/"
157-
// ],
155+
testPathIgnorePatterns: [
156+
"/node_modules/",
157+
"/test/deno/"
158+
],
158159

159160
// The regexp pattern or array of patterns that Jest uses to detect test files
160161
// testRegex: [],

packages/core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"test": "jest",
1111
"test::watch": "jest --watch",
1212
"test::unit": "npm run test",
13+
"test::deno": "deno test --allow-none ./test/deno/",
1314
"predocs": "npm run build && npm run build::es6",
1415
"docs": "esdoc -c esdoc.json",
1516
"prepare": "npm run build",

packages/core/test/deno/.gitkeep

Whitespace-only changes.

testkit/unittests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414

1515
run_in_driver_repo(["npm", "run", "lint"])
1616
run_in_driver_repo(["npm", "run", "test::unit", "--", ignore])
17+
18+
if is_deno():
19+
run_in_driver_repo(["npm" "run", "test::deno"])

0 commit comments

Comments
 (0)