From 0af0132d07fe80ffc136e8077187999828450e40 Mon Sep 17 00:00:00 2001 From: Vitaliy Potapov Date: Tue, 14 Nov 2023 13:05:21 +0400 Subject: [PATCH] fix --- .github/workflows/test-win.yaml | 2 +- src/snippets/index.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-win.yaml b/.github/workflows/test-win.yaml index c31e50be..58d3c19d 100644 --- a/.github/workflows/test-win.yaml +++ b/.github/workflows/test-win.yaml @@ -17,7 +17,7 @@ jobs: with: node-version: 18 - run: npm ci - - run: npm install @playwright/test@1.39 @cucumber/cucumber@9 + - run: npm install @playwright/test@1.39 @cucumber/cucumber@10 - run: npx playwright install --with-deps chromium - name: run tests env: diff --git a/src/snippets/index.ts b/src/snippets/index.ts index 5c5faf8d..bec7024e 100644 --- a/src/snippets/index.ts +++ b/src/snippets/index.ts @@ -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'; @@ -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; }