Skip to content

Commit cb312cf

Browse files
chore: fix various issues with tooling, tests, etc (#11)
* add tsconfig so it can see non-module files, fixes #6 * pull in gherkin test data locally for now * fix some issues with status counting * remove ESM hints from package.json to unconfuse storybook/babel, fixes #8 * configure tsc build to dist * dont ignore lockfile * add basic workflow * fix workflow config * replace makefile with js impl * add condition to dir remove * provide a uri for search tests * Fix regression in GherkinDocumentList * Fix regression in search * force mocha to exit after tests * add compile step to test build * avoid duplication of ci runs Co-authored-by: Aslak Hellesøy <aslak.hellesoy@gmail.com>
1 parent ad4eb5c commit cb312cf

File tree

243 files changed

+51947
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+51947
-52
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: set git core.autocrlf to 'input'
17+
run: git config --global core.autocrlf input
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v2
20+
with:
21+
node-version: '16.x'
22+
cache: 'npm'
23+
cache-dependency-path: package-lock.json
24+
- run: npm ci
25+
- run: npm test
26+
- run: npm run eslint
27+
- run: npm run compile

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
dist/
22
.idea/
33
node_modules/
4-
yarn.lock
5-
package-lock.json
64
*.log
75
.codegen
86
acceptance/

.mocharc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
],
88
"extension": ["ts", "tsx"],
99
"recursive": true,
10-
"timeout": 10000
10+
"timeout": 10000,
11+
"exit": true
1112
}

Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

generate-fixtures.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const glob = require('glob')
2+
const fs = require('fs')
3+
const path = require('path')
4+
5+
if (fs.existsSync('acceptance')) {
6+
fs.rmdirSync('acceptance', { recursive: true })
7+
}
8+
9+
for (const ndjsonPath of glob.sync(
10+
'node_modules/@cucumber/compatibility-kit/features/**/*.ndjson'
11+
)) {
12+
const filename = path.basename(ndjsonPath)
13+
const [suiteName, ...suffixes] = filename.split('.')
14+
const content = fs.readFileSync(ndjsonPath, { encoding: 'utf-8' })
15+
const asTs = `// Generated file. Do not edit.
16+
export default [${content.split('\n').join(',')}]
17+
`
18+
const targetPath = `acceptance/${suiteName}/${suiteName}.${suffixes
19+
.filter((s) => s !== 'ndjson')
20+
.join('.')}.ts`
21+
fs.mkdirSync(`acceptance/${suiteName}`, { recursive: true })
22+
fs.writeFileSync(targetPath, asTs, { encoding: 'utf-8' })
23+
}

0 commit comments

Comments
 (0)