Skip to content

Commit

Permalink
test(tests2png): patch tests2png configuration to work with typescrip…
Browse files Browse the repository at this point in the history
…t test cases
  • Loading branch information
kwonoj committed Mar 1, 2016
1 parent 60631e0 commit 4bc32b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"test_buildonly": "rm -rf tmp && tsc --project ./spec --pretty",
"test": "npm run test_buildonly && npm run test_nobuild",
"test_karma": "karma start karma.conf.js",
"tests2png": "mkdirp tmp/docs/img && JASMINE_CONFIG_PATH=spec/support/tests2png.json jasmine",
"tests2png": "mkdirp tmp/docs/img && cp -r spec/helpers/tests2png tmp/helpers/tests2png && jasmine JASMINE_CONFIG_PATH=spec/support/tests2png.json",
"watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15",
"perf": "protractor protractor.conf.js",
"perf_micro": "node ./perf/micro/index.js",
Expand Down
3 changes: 3 additions & 0 deletions spec/helpers/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ function assertAction(done: DoneSignature, assertion: (done?: DoneSignature) =>
}

export function asDiagram(expectation: string): (expectation: string, assertion?: (done: DoneSignature) => void, timeout?: number) => void {
if (global.it.asDiagram) {
return global.it.asDiagram(expectation);
}
return it;
}

Expand Down
5 changes: 3 additions & 2 deletions spec/support/tests2png.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"spec_dir": "spec",
"spec_dir": "tmp",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/tests2png/diagram-test-runner.js"
"helpers/tests2png/diagram-test-runner.js",
"helpers/**/*helper.js"
]
}

0 comments on commit 4bc32b7

Please sign in to comment.