Skip to content

Commit 46232af

Browse files
authored
Add a Unit Testing Skeleton (#5)
* Add test skeleton * Change empty string quote type * Ignore .pnpm-store * Add test to ci * Update pnpm-lock * Add missing semicolon
1 parent 9d0fd44 commit 46232af

File tree

5 files changed

+5711
-3229
lines changed

5 files changed

+5711
-3229
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.pnpm-store
12
node_modules
23
*.log
34
/.idea

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"author": "Gerald <[email protected]>",
66
"license": "MIT",
77
"scripts": {
8-
"ci": "run-s lint",
8+
"ci": "run-s lint test",
99
"lint": "eslint src",
1010
"dev": "rollup -wc",
1111
"clean": "del-cli dist",
1212
"build:js": "rollup -c",
1313
"build:types": "tsc",
1414
"build": "run-s ci clean build:js build:types",
15+
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
1516
"prepare": "husky install",
1617
"prepublishOnly": "run-s build"
1718
},
@@ -45,12 +46,17 @@
4546
"devDependencies": {
4647
"@gera2ld/plaid": "~2.7.0",
4748
"@gera2ld/plaid-rollup": "~2.7.0",
49+
"@gera2ld/plaid-test": "^2.6.0",
4850
"@types/node": "^20.10.6",
51+
"cross-env": "^7.0.3",
4952
"del-cli": "^5.1.0",
5053
"husky": "^8.0.3"
5154
},
5255
"repository": "[email protected]:violentmonkey/rollup-plugin-userscript.git",
5356
"engines": {
5457
"node": ">=18"
58+
},
59+
"jest": {
60+
"extensionsToTreatAsEsm": [".ts"]
5561
}
5662
}

0 commit comments

Comments
 (0)