This repository was archived by the owner on May 10, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +79
-232
lines changed Expand file tree Collapse file tree 5 files changed +79
-232
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ jobs :
3+ build :
4+ working_directory : ~/graphql-cli-prepare
5+ docker :
6+ - image : circleci/node:latest
7+ steps :
8+ - checkout
9+ - run :
10+ name : update-npm
11+ command : ' sudo npm install -g yarn@latest'
12+ - restore_cache :
13+ key : dependency-cache-{{ checksum "package.json" }}
14+ - run :
15+ name : install-yarn
16+ command : yarn install
17+ - save_cache :
18+ key : dependency-cache-{{ checksum "package.json" }}
19+ paths :
20+ - ./node_modules
21+ - run :
22+ name : test
23+ command : yarn test
24+ - run :
25+ name : release
26+ command : yarn semantic-release || true
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77 "scripts" : {
88 "prepublish" : " npm run build" ,
99 "build" : " rm -rf dist && tsc -d" ,
10+ "pretest" : " npm run build" ,
1011 "test" : " nyc cucumber-js --compiler ts:ts-node/register test/features/ -r test/step_definitions/ -f json:test/report/cucumber_report.json" ,
11- "dposttest" : " node test/createReport.js && nyc report --reporter=text-lcov | coveralls" ,
12+ "posttest" : " node test/createReport.js && nyc report --reporter=text-lcov | coveralls" ,
13+ "vscodetest" : " nyc --reporter=lcov --reporter=text-summary cucumber-js --compiler ts:ts-node/register test/features/ -r test/step_definitions/ -f ./test/tap-formatter.js" ,
1214 "semantic-release" : " semantic-release"
1315 },
1416 "keywords" : [
4951 "coveralls" : " 3.0.0" ,
5052 "cucumber" : " 3.2.0" ,
5153 "nyc" : " 11.4.1" ,
52- "semantic-release" : " 11 .1.0" ,
54+ "semantic-release" : " 12 .1.0" ,
5355 "ts-node" : " 4.1.0" ,
5456 "typescript" : " 2.6.2"
5557 },
Original file line number Diff line number Diff line change 1+ const Formatter = require ( 'cucumber/lib/formatter' ) . default
2+
3+ class SummaryFormatter extends Formatter {
4+ constructor ( options ) {
5+ super ( options )
6+ options . eventBroadcaster . on ( 'test-run-finished' , this . logSummary . bind ( this ) )
7+ }
8+
9+ logSummary ( testRun ) {
10+ let counter = 1
11+
12+ const count = Object . keys ( this . eventDataCollector . testCaseMap ) . length
13+ this . log ( `TAP version 13\n` )
14+ this . log ( `1..${ count } \n` )
15+ for ( const test in this . eventDataCollector . testCaseMap ) {
16+ const testCase = this . eventDataCollector . testCaseMap [ test ]
17+
18+ const testCaseData = this . eventDataCollector . getTestCaseData ( testCase . sourceLocation )
19+
20+ const featureName = testCaseData . gherkinDocument . feature . name
21+ const scenarioName = testCaseData . pickle . name
22+ const result = testCase . result . status
23+
24+ this . log ( `${ result === 'passed' ? 'ok' : 'not ok' } ${ counter } ${ featureName } - ${ scenarioName } \n` )
25+
26+ counter ++
27+ }
28+ }
29+ }
30+
31+ exports . default = SummaryFormatter
You can’t perform that action at this time.
0 commit comments