Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
test:
name: Run tests on Node.js ${{ matrix.node-version }}
runs-on: self-hosted-arc
runs-on: ubuntu-latest

strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
release-please:
runs-on: self-hosted-arc
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
Expand All @@ -29,7 +29,7 @@ jobs:
publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: self-hosted-arc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand Down
9 changes: 7 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ const DOM_TESTING_LIBRARY_UMD_PATH = path.join(
"dist/@testing-library/dom.umd.js",
);

const DOM_TESTING_LIBRARY_UMD = fs.readFileSync(DOM_TESTING_LIBRARY_UMD_PATH).toString().replace("define.amd", "false");
const DOM_TESTING_LIBRARY_UMD = fs
.readFileSync(DOM_TESTING_LIBRARY_UMD_PATH)
.toString()
.replace("define.amd", "false")
// exports and module are defined in component tests. Without this patch, testing-library won't init
.replace("typeof exports === 'object' && typeof module !== 'undefined'", "false");

let _config: Partial<Config>;

Expand Down Expand Up @@ -90,7 +95,7 @@ async function injectDOMTestingLibrary(container: WebdriverIO.Element) {
);
}
} else {
eval(library);
window.eval(library);
}
}, DOM_TESTING_LIBRARY_UMD);
}
Expand Down