Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Nov 14, 2023
1 parent bce3610 commit 0af0132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: 18
- run: npm ci
- run: npm install @playwright/[email protected] @cucumber/cucumber@9
- run: npm install @playwright/[email protected] @cucumber/cucumber@10
- run: npx playwright install --with-deps chromium
- name: run tests
env:
Expand Down
4 changes: 3 additions & 1 deletion src/snippets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Generate and show snippets for undefined steps
*/

import { pathToFileURL } from 'node:url';
import { IRunConfiguration, ISupportCodeLibrary } from '@cucumber/cucumber/api';
import { loadSnippetBuilder } from '../cucumber/loadSnippetBuilder';
import { TestFile, UndefinedStep } from '../gen/testFile';
Expand Down Expand Up @@ -38,11 +39,12 @@ export class Snippets {
const { snippetSyntax } = this.runConfiguration.formats.options;
if (!snippetSyntax && this.isPlaywrightStyle()) {
this.bddBuiltInSyntax = true;
return this.isDecorators()
const filePath = this.isDecorators()
? require.resolve('./snippetSyntaxDecorators.js')
: this.isTypeScript()
? require.resolve('./snippetSyntaxTs.js')
: require.resolve('./snippetSyntax.js');
return pathToFileURL(filePath).toString();
} else {
return snippetSyntax;
}
Expand Down

0 comments on commit 0af0132

Please sign in to comment.