Skip to content

Commit

Permalink
fix: fix issue with tests potentially being double-started, or starte…
Browse files Browse the repository at this point in the history
…d before being ready (#2)

Also fixes id-token write permission in release workflow, required for npm provenance.

build: add back id-token write permission to release workflow

build: set NODE_AUTH_TOKEN to secrets.GITHUB_TOKEN in Publish step of release
  • Loading branch information
pmoeller91-yottaa committed Aug 12, 2024
1 parent a55f94d commit da687d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
contents: write
pull-requests: write
packages: write
id-token: write
steps:
- uses: googleapis/release-please-action@v4
id: release
Expand Down Expand Up @@ -41,6 +42,8 @@ jobs:
- name: Publish
if: ${{ steps.release.outputs.release_created }}
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Suggestion from the release-please-action repo README
- name: Tag major and minor versions
Expand Down
2 changes: 1 addition & 1 deletion examples/wdio-cjs/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports.config = {
framework: 'mocha',
reporters: ['spec'],

services: [['qunit', { autostartDelay: 1000 }]],
services: [['qunit', { autostartDelay: 5000 }]],
mochaOpts: {
ui: 'bdd',
timeout: 60000
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ async function QunitFinishedEventInBrowserContext(
});
const automaticRunStartPromise = new Promise<void>((resolve) => {
window.setTimeout(() => {
if (!started) {
if (!started && !window.QUnit.config.started) {
started = true;
console.debug('QUnit started automatically by service'); // eslint-disable-line no-console
window.QUnit.start();
resolve();
Expand Down

0 comments on commit da687d3

Please sign in to comment.