File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ Jasmine Runner Usage
2+ =====================
3+
4+ If you want to test this runner from scratch, start by creating a new jasmine project:
5+
6+ ```
7+ % npm install --save-dev jasmine jasmine-json-test-reporter
8+ % npx jasmine init
9+ % npx jasmine example
10+ % git add . && git commit -m "Initial commit"
11+ ```
12+
13+ Create spec/helpers/jasmine-json-test-reporter.js
14+ ```
15+ var JSONReporter = require('jasmine-json-test-reporter');
16+ jasmine.getEnv().addReporter(new JSONReporter({
17+ file: 'jasmine-report.json'
18+ }));
19+ ```
20+
21+ Record tests
22+ ```
23+ BUILD_NAME=jasmine_build
24+ launchable record build --name ${BUILD_NAME}
25+ launchable record session --build ${BUILD_NAME} > session.txt
26+
27+ # Write all tests to a file
28+ find spec/jasmine_examples -type f > test_list.txt
29+
30+ # Run all tests
31+ npx jasmine $(cat test_list.txt)
32+
33+ launchable record tests --base $(pwd) jasmine jasmine-report.json
34+ ```
35+
36+ Request subset
37+ ```
38+ cat test_list.txt | launchable subset --target 25% jasmine > subset.txt
39+ npx jasmine $(cat subset.txt)
40+ ```
41+
You can’t perform that action at this time.
0 commit comments