File tree Expand file tree Collapse file tree 4 files changed +64
-2
lines changed Expand file tree Collapse file tree 4 files changed +64
-2
lines changed Original file line number Diff line number Diff line change 40
40
41
41
// Cucumber settings
42
42
"cucumber.features" : [
43
- " test/e2e /features/**/*.feature" ,
43
+ " test/** /features/**/*.feature" ,
44
44
],
45
45
"cucumber.glue" : [
46
- " test/e2e /features/**/*.ts"
46
+ " test/** /features/**/*.ts" ,
47
47
],
48
48
}
Original file line number Diff line number Diff line change
1
+ const common = {
2
+ requireModule : [ 'ts-node/register' ] ,
3
+ require : [ `${ __dirname } /features/**/*.ts` ] ,
4
+ publishQuiet : true ,
5
+ format : [ 'progress' ] ,
6
+ formatOptions : {
7
+ snippetInterface : 'async-await'
8
+ } ,
9
+ worldParameters : {
10
+ bundleServerCommand : `${ __dirname } /../../bin/git-bundle-server` ,
11
+ trashDirectoryBase : `${ __dirname } ../../_test/integration`
12
+ }
13
+ }
14
+
15
+ module . exports = {
16
+ default : {
17
+ ...common ,
18
+ } ,
19
+ ci : {
20
+ ...common ,
21
+ tags : 'not @daemon' ,
22
+ } ,
23
+ }
Original file line number Diff line number Diff line change
1
+ import * as path from 'path'
2
+
3
+ export function absPath ( pathParam : string ) : string {
4
+ // Convert a given path (either relative to 'test/integration/' or absolute) to an
5
+ // absolute path
6
+ if ( ! path . isAbsolute ( pathParam ) ) {
7
+ return path . resolve ( __dirname , "../.." , pathParam )
8
+ } else {
9
+ return pathParam
10
+ }
11
+ }
12
+
13
+ export function repoRoot ( pathParam : string ) : string {
14
+ // Get repo root for given path
15
+ if ( ! path . isAbsolute ( pathParam ) ) {
16
+ return path . resolve ( __dirname , "../../../../git" , pathParam )
17
+ } else {
18
+ return pathParam
19
+ }
20
+ }
21
+
22
+ export function routesPath ( ) : string {
23
+ // Get path to routes file
24
+ return path . resolve ( __dirname , "../../../../routes" )
25
+ }
Original file line number Diff line number Diff line change
1
+ import { setWorldConstructor , World , IWorldOptions } from '@cucumber/cucumber'
2
+ import * as child_process from 'child_process'
3
+
4
+ interface BundleServerParameters {
5
+ bundleServerCommand : string
6
+ }
7
+
8
+ export class BundleServerWorld extends World < BundleServerParameters > {
9
+ runCommand ( commandArgs : string ) : child_process . SpawnSyncReturns < Buffer > {
10
+ return child_process . spawnSync ( `${ this . parameters . bundleServerCommand } ${ commandArgs } ` , [ ] , { shell : true } )
11
+ }
12
+ }
13
+
14
+ setWorldConstructor ( BundleServerWorld )
You can’t perform that action at this time.
0 commit comments