File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed
allure-js-commons/src/sdk/runtime Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -28,20 +28,14 @@ export const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<Test
2828 return testRuntime ( ) ?? noopRuntime ;
2929 }
3030
31- if ( "_playwrightInstance" in globalThis ) {
32- try {
33- // protection from bundlers tree-shaking visiting (webpack, rollup)
34- // @ts -ignore
35- // eslint-disable-next-line no-eval
36- return ( 0 , eval ) ( "(() => import('allure-playwright/autoconfig'))()" ) . then ( ( ) => {
37- return getGlobalTestRuntimeFunction ( ) ?.( ) ?? noopRuntime ;
38- } ) ;
39- } catch ( err ) {
40- // eslint-disable-next-line no-console
41- console . log ( "can't execute allure-playwright/autoconfig" , err ) ;
42- return noopRuntime ;
43- }
44- }
31+ try {
32+ // protection from bundlers tree-shaking visiting (webpack, rollup)
33+ // @ts -ignore
34+ // eslint-disable-next-line no-eval
35+ return ( 0 , eval ) ( "(() => import('allure-playwright/autoconfig'))()" ) . then ( ( ) => {
36+ return getGlobalTestRuntimeFunction ( ) ?.( ) ?? noopRuntime ;
37+ } ) ;
38+ } catch ( ignored ) { }
4539
4640 return noopRuntime ;
4741} ;
Original file line number Diff line number Diff line change 1+ import { test } from "@playwright/test" ;
12import { setGlobalTestRuntime } from "allure-js-commons/sdk/runtime" ;
23import { AllurePlaywrightTestRuntime } from "./runtime.js" ;
34
4- setGlobalTestRuntime ( new AllurePlaywrightTestRuntime ( ) ) ;
5+ if ( test . info ( ) ) {
6+ setGlobalTestRuntime ( new AllurePlaywrightTestRuntime ( ) ) ;
7+ }
You can’t perform that action at this time.
0 commit comments