Skip to content

Commit

Permalink
test(mocha): run test directly from compiled results
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Sep 23, 2019
1 parent d9b08cb commit 32f8500
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"prepublishOnly": "npm run build:package",
"postpublish": "./docs_app/scripts/publish-docs.sh",
"publish_docs": "./publish_docs.sh",
"test": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha --opts spec/support/default.opts \"spec/**/*-spec.ts\"",
"test_no_cache": "cross-env TS_NODE_PROJECT=spec/tsconfig.json TS_NODE_CACHE=false mocha --opts spec/support/default.opts \"spec/**/*-spec.ts\"",
"test_transpile_only": "cross-env TS_NODE_PROJECT=spec/tsconfig.json TS_NODE_TRANSPILE_ONLY=true mocha --opts spec/support/default.opts \"spec/**/*-spec.ts\"",
"test": "npm run compile && shx cp -Rf ./dist/cjs ./dist/src && mocha --opts spec/support/default.opts \"dist/spec/**/*-spec.js\"",
"test:browser": "echo \"Browser test is not working currently\" && exit -1 && npm-run-all build:spec:browser && opn spec/support/mocha-browser-runner.html",
"test:circular": "dependency-cruise --validate .dependency-cruiser.json -x \"^node_modules\" dist/esm5",
"test:systemjs": "node integration/systemjs/systemjs-compatibility-spec.js",
Expand Down
2 changes: 1 addition & 1 deletion spec/observables/dom/animationFrames-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from 'chai';
import { animationFrames, Subject } from 'rxjs';
import * as sinon from 'sinon';
import { take, takeUntil } from 'rxjs/operators';
import { RAFTestTools, stubRAF } from 'spec/helpers/test-helper';
import { RAFTestTools, stubRAF } from '../../helpers/test-helper';

describe('animationFrame', () => {
let raf: RAFTestTools;
Expand Down
6 changes: 3 additions & 3 deletions spec/support/default.opts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--require ts-node/register
--require tsconfig-paths/register
--require spec/helpers/polyfills.ts
--require spec/helpers/testScheduler-ui.ts
--ui spec/helpers/testScheduler-ui.ts
--require dist/spec/helpers/polyfills.js
--require dist/spec/helpers/testScheduler-ui.js
--ui dist/spec/helpers/testScheduler-ui.js

--reporter dot

Expand Down
5 changes: 4 additions & 1 deletion src/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"module": "commonjs",
"target": "es5",
"outDir": "../dist/cjs"
}
},
"exclude": [
"./internal/umd.ts"
]
}
5 changes: 4 additions & 1 deletion src/tsconfig.esm5.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"importHelpers": true,
"target": "es5",
"outDir": "../dist/esm5"
}
},
"exclude": [
"./internal/umd.ts"
]
}
3 changes: 2 additions & 1 deletion src/tsconfig.esm5.rollup.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"compilerOptions": {
"outDir": "../dist/esm5_for_rollup",
"noEmitHelpers": true
}
},
"exclude": []
}
5 changes: 4 additions & 1 deletion src/tsconfig.types.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"declarationMap": true,
"declarationDir": "../dist/types",
"emitDeclarationOnly": true
}
},
"exclude": [
"./internal/umd.ts"
]
}

0 comments on commit 32f8500

Please sign in to comment.