Skip to content

Commit

Permalink
Converted unit tests to Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwilaby committed Sep 1, 2019
1 parent 5197b5d commit 5b022d6
Show file tree
Hide file tree
Showing 17 changed files with 453 additions and 337 deletions.
7 changes: 7 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
require: 'source-map-support/register',
'full-trace': true,
bail: true,
extension: ['ts'],
spec: 'src/**/*.spec.ts'
};
13 changes: 7 additions & 6 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"extension": [
".js"
".ts"
],
"include": [
"lib/**/*.js"
"src/**/*.ts"
],
"require": [
"ts-node/register"
],
"exclude": [
"**/node_modules/**",
"**/__test__/**",
"**/src/**",
"**/coverage/**",
"**/*.d.ts"
"**/coverage/**"
],
"reporter": [
"html"
],
"all": true,
"all": false,
"cache": true
}
2 changes: 0 additions & 2 deletions lib/sax-wasm.js

This file was deleted.

113 changes: 94 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lib/sax-wasm.wasm"
],
"scripts": {
"test": "nyc mocha src/js/__test__/",
"test": "nyc --reporter=text mocha",
"test:coveralls": "npm run test && nyc report --reporter=text-lcov | coveralls",
"build:wasm": "rustc ./src/lib.rs -Clto -O --crate-type cdylib --target wasm32-unknown-unknown -o ./lib/sax-wasm.wasm",
"bindgen": "wasm-bindgen lib/sax-wasm.wasm --out-dir lib/ --remove-name-section --no-typescript --out-name sax-wasm.wasm",
Expand All @@ -28,12 +28,16 @@
"author": "Justin Wilaby",
"license": "MIT",
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/expect.js": "^0.3.29",
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.8",
"coveralls": "^3.0.4",
"coveralls": "^3.0.6",
"expect.js": "^0.3.1",
"mocha": "^6.1.4",
"mocha": "^6.2.0",
"nyc": "^14.1.1",
"typescript": "^3.5.2"
"source-map-support": "^0.5.13",
"ts-node": "^8.3.0",
"typescript": "^3.6.2"
}
}
100 changes: 0 additions & 100 deletions src/js/__test__/attribute.spec.js

This file was deleted.

Loading

0 comments on commit 5b022d6

Please sign in to comment.