Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from qunitjs:main #1

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
62cc6d9
docs: minor tweak to examples
Krinkle Aug 6, 2024
9a1fc05
CLI: Remove confusing `expected: undefined` from TAP for non-assert fail
Krinkle Aug 7, 2024
a952967
Docs: Add SAP OpenUI5 to Projects
Krinkle Aug 8, 2024
276e09d
CLI: Apply trace cleaning and internal greying to assertion stack
Krinkle Aug 9, 2024
eb93713
HTML Reporter: Add support for early rendering
Krinkle Aug 9, 2024
4cc448d
Docs: Update url and version to 2.22.0
Krinkle Aug 18, 2024
a46077f
docs: Write changelog for QUnit 3.0.0-alpha.3
Krinkle Aug 18, 2024
6a3433e
Release 3.0.0-alpha.3
Krinkle Aug 19, 2024
96ef4de
Docs: Update demos to 3.0.0-alpha.3
Krinkle Aug 19, 2024
fbda62b
Build: Fix reproducible-builds.js
Krinkle Aug 19, 2024
f86ad31
Build: Update `build/site-set-version.js` to account for browser.md
Krinkle Aug 19, 2024
bc65733
HTML Reporter: Revert "Clip qunit-userAgent to one line" (unreleased)
Krinkle Aug 25, 2024
112dacc
Build: Refactor QUnit.start() definition to inject self-reference
Krinkle Aug 25, 2024
7d7eb09
Demos: Add integration test for `require('qunit').QUnit`
Krinkle Aug 26, 2024
05a52c8
Build: Alphabetize internal import statements
Krinkle Aug 26, 2024
6799e6a
Build: Fold core.js into qunit.js
Krinkle Aug 27, 2024
a696648
Build: Update proxyquire (dev dependency) from 1.x to 2.x
Krinkle Aug 27, 2024
efae08d
Test: Improve failure details of requireQUnit() test
Krinkle Aug 27, 2024
f5a7160
Test: Prep require-qunit.js test for ESM package
Krinkle Aug 28, 2024
86c5b20
Test: Use file extension for consistency
Krinkle Aug 28, 2024
51d0196
Docs: 3.0.0-alpha changelog tweaks
Krinkle Aug 28, 2024
5b7ab95
Build: Enable and fix 'strict' via ESLint for Node.js files
Krinkle Sep 4, 2024
e448aa3
Build: Switch from https.get() to fetch()
Krinkle Sep 4, 2024
ec7d6e7
Core: Add native ESM distribution
Krinkle Sep 4, 2024
0231379
Core: Throw TypeError instead of Error for invalid test.each() dataset
Krinkle Sep 5, 2024
bf42d2b
Core: Add automatic labels in test.each() for primitive values in arrays
Krinkle Sep 8, 2024
06424ba
Build: Remove package-lock.json
Krinkle Sep 13, 2024
d37b877
Build: Remove package-lock step from build/prep-release.js
Krinkle Sep 13, 2024
a0027db
CLI: Add `--seed=true` to generate a new seed
Krinkle Sep 29, 2024
a006064
CLI: Limit colors in TAP reporter to test names
Krinkle Oct 10, 2024
3b342b7
Docs: Add "Badge" page
Krinkle Oct 11, 2024
26f13a7
Build: Fix iOS 12 by switching from iPhone 8 to iPhone XS
Krinkle Nov 4, 2024
8911e3c
Release 3.0.0-alpha.4
Krinkle Nov 4, 2024
0900773
Build: Include ESM files in npm package
Krinkle Nov 4, 2024
1a627f4
Build: Pin dev dependencies
Krinkle Nov 4, 2024
e35befa
Docs: Update examples to 3.0.0-alpha.4
Krinkle Nov 4, 2024
c5ee904
Test: Convert memory-leak test cases to `.tap.txt` fixture
Krinkle Nov 24, 2024
81730d8
Test: Minor clean up to `/test/cli/cli-watch.js`
Krinkle Nov 24, 2024
7a884b1
Test: Inline cli-watch.js test cases and remove "expected/" directory
Krinkle Nov 25, 2024
1d9d622
Docs: Add 2.23.0 changelog
Krinkle Dec 3, 2024
8f096e9
Docs: Update url and version to 2.23.0
Krinkle Dec 3, 2024
05dbbfd
Build: Remove spider-check trigger from new branches/tags
Krinkle Dec 3, 2024
67cec45
Build: Switch CI/macOS job from macos-12 to macos-13
Krinkle Dec 3, 2024
343ac0b
Docs: Explain objects in `QUnit.test.each()` and improve examples
Krinkle Dec 4, 2024
80be27b
Core: Restore `QUnit.extend` without deprecation
Krinkle Dec 4, 2024
4349fa5
Docs: Add Node.js 18+ to QUnit 3.0 changelog
Krinkle Dec 4, 2024
3d8aae7
Docs: Write "Reduce code duplication" chapter for `QUnit.test.each()`
Krinkle Dec 5, 2024
73c03cf
HTML Reporter: Fix broken "Rerun without a depth limit" link (really)
Krinkle Dec 5, 2024
ba93209
Docs: Add 2.23.1 changelog
Krinkle Dec 6, 2024
5382fbe
Docs: Fix two broken links, per hydra-link-checker (spider-check job)
Krinkle Dec 6, 2024
27655d7
Docs: Write "Changelog" section for QUnit.config.seed
Krinkle Dec 7, 2024
ef73ecb
Theme: Improve `.qunit-test.fail` and expected/actual diff colors
Krinkle Dec 21, 2024
5f810e5
Docs: Create the QUnit Blog, backfill with curated changelogs
Krinkle Jan 16, 2025
43b16d1
Docs: Update url and version to 2.23.1
Krinkle Jan 16, 2025
db5c22b
Docs: Set `author_permalink`
Krinkle Jan 16, 2025
4a8410a
Docs: Set JEKYLL_ENV=production
Krinkle Jan 16, 2025
038672d
Core: Restore IE9-10 support
Krinkle Jan 16, 2025
f6a75d5
Docs: Dogfood the "Tested with QUnit" badge
Krinkle Jan 17, 2025
9d4afff
Docs: Tweak assert/index.md description
Krinkle Jan 17, 2025
280e721
Test: Fix TapReporter test to cover and use corrent 'internal' stack …
Krinkle Jan 18, 2025
166b346
Build: Fix deranking of blog posts in Typesense search index
Krinkle Jan 18, 2025
53ee0a7
Test: End-to-end test for `.mjs` and `.js` default file extensions
Krinkle Jul 8, 2024
8b5c627
Docs: Fix mistaken use of localhost URL in some release notes
Krinkle Jan 18, 2025
abefa66
Docs: Add docs for `QUnit.reporters`
Krinkle Jan 19, 2025
088069b
Docs: Clarify generated nature of HTML tree to discourage copy-pasting
Krinkle Jan 19, 2025
d484d14
Docs: Create a "Community" menu and add "Support & Chat" link
Krinkle Jan 19, 2025
764dc1a
Test: Fix typo in config-reporters.html test name
Krinkle Jan 19, 2025
61edef5
Docs: Misc tweaks on Step API, config.testTimeout and Intro.
Krinkle Jan 19, 2025
9bce04a
Docs: Add Basecamp and Ruby to projects
Krinkle Jan 20, 2025
9524ad0
Docs: Update url and version to 2.24.0
Krinkle Jan 20, 2025
ceb2b46
Docs: Publish "Cleaner stack traces" blog post
Krinkle Jan 21, 2025
175964e
Docs: Add 2.24.0 changelog
Krinkle Jan 21, 2025
adc4493
CLI: Fix TAP compliance for actual/expected indent and skip/todo colors
Krinkle Jan 24, 2025
0ecf13f
Build: Fix coverage job
Krinkle Jan 24, 2025
65d0e6f
Docs: Publish a copy of the q4000 benchmark to qunitjs.com
Krinkle Jan 22, 2025
97ef091
Docs: Retropost "Introduce multi-select" (2016) and "Redesign module …
Krinkle Jan 22, 2025
f021c9b
Docs: Import release excerpts for 1.3.0-2.21.1 from twitter.com/qunitjs
Krinkle Jan 22, 2025
1536173
Docs: Add 2.24.1 changelog
Krinkle Jan 26, 2025
a75a3c5
Docs: Add Hotwired to projects
Krinkle Jan 26, 2025
818eb9d
Docs: Fix bad link in 2.24.0 release blogpost
Krinkle Jan 26, 2025
daab672
Docs: Improve readme and contributing docs
Krinkle Jan 26, 2025
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
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"no-console": "error",
"compat/compat": [
"error",
"android >= 4.3, firefox >= 45, ie >= 11, safari >= 9.1, ios_saf >= 7, chrome >= 58"
"android >= 4.3, firefox >= 45, ie >= 9, safari >= 9.1, ios_saf >= 7, chrome >= 58"
]
}
},
Expand All @@ -61,7 +61,7 @@
"rules": {
"compat/compat": [
"error",
"android >= 4.3, firefox >= 45, ie >= 11, safari >= 9.1, chrome >= 58"
"android >= 4.3, firefox >= 45, ie >= 9, safari >= 9.1, chrome >= 58"
],
"max-len": "off",
"no-throw-literal": "off",
Expand All @@ -81,7 +81,7 @@
{
"files": [
"bin/**",
"build/**",
"build/**/*.js",
"src/cli/**",
"Gruntfile.js",
"rollup.config.js"
Expand All @@ -99,6 +99,7 @@
"node": true
},
"rules": {
"strict": "error",
"compat/compat": "off",
"no-console": "off",
"no-process-exit": "off",
Expand Down
30 changes: 13 additions & 17 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,15 @@ jobs:
node: 18.x
script: npm run test-nolint

# use macos-12 instead of macos-latest
# as proxy for Intel instead of ARM
# because the older Puppeteer/Chrome for Node 10 compat
# didn't support ARM yet.
- name: "macOS: Node 18"
os: macos-12
os: macos-13
node: 18.x
script: npm run test-nolint

name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
FORCE_COLOR: "1"
steps:
- uses: actions/checkout@v4
Expand All @@ -62,14 +58,14 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- run: npm ci
- run: npm install

- name: Tests
run: ${{ matrix.script }}
Expand All @@ -89,23 +85,23 @@ jobs:
name: SpiderMonkey 68
runs-on: ubuntu-20.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install mozjs
run: |
sudo apt-fast install -y libmozjs-68-dev
- run: npm ci
- run: npm install
- run: npm run build
- name: Test mozjs.js
run: js68 test/mozjs.js
Expand All @@ -127,23 +123,23 @@ jobs:
name: SpiderMonkey 102
runs-on: ubuntu-24.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install mozjs
run: |
sudo apt-get install -y libmozjs-102-dev
- run: npm ci
- run: npm install
- run: npm run build
- name: Test mozjs.js
run: js102 test/mozjs.js
Expand All @@ -165,23 +161,23 @@ jobs:
name: SpiderMonkey 115
runs-on: ubuntu-24.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install mozjs
run: |
sudo apt-get install -y libmozjs-115-dev
- run: npm ci
- run: npm install
- run: npm run build
- name: Test mozjs.js
run: js115 test/mozjs.js
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/browsers-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
runs-on: ubuntu-latest
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4

Expand All @@ -26,7 +26,7 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v4
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Prepare
run: |
npm ci
npm install
npm run build

- name: Tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/browsers-quick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
runs-on: ubuntu-latest
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4

Expand All @@ -17,7 +17,7 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v4
Expand All @@ -26,7 +26,7 @@ jobs:

- name: Prepare
run: |
npm ci
npm install
npm run build

# To debug locally:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
runs-on: ubuntu-20.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
FORCE_COLOR: "1"
steps:
- uses: actions/checkout@v4

Expand All @@ -17,14 +18,14 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x

- run: npm ci
- run: npm install

- name: Tests
run: npm run coverage
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
- name: Jekyll build
# If your site is in a subdirectory
working-directory: ./docs/
env:
JEKYLL_ENV: production
run: bundle exec jekyll build

- name: Push to branch
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/reproducible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
- cron: '30 0 * * 1'
# Or manually
workflow_dispatch:
# Or when developing this workflow
push:
paths:
- .github/workflows/reproducible.yaml

jobs:
run:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/spider-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ on:
- cron: '0 0 * * 5'
# Or manually
workflow_dispatch:
# Or when developing this workflow
push:
paths:
- .github/workflows/spider-check.yaml
pull_request:
paths:
- .github/workflows/spider-check.yaml

jobs:
spider-check:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
/qunit/
/temp/
/.eslintcache
/package-lock.json
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Dave K. Smith <[email protected]>
David Vollbracht <[email protected]>
Jochen Ulrich <[email protected]>
Michał Gołębiowski-Owczarek <[email protected]>
Leonardo Balter <[email protected]>
Leo Balter <[email protected]> <[email protected]>
Kevin Partington <[email protected]>
Kevin Partington <[email protected]> <[email protected]>
Manoj Kumar <[email protected]> <[email protected]>
Expand Down
43 changes: 16 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

# Contributing

Welcome! Thanks for your interest in contributing to QUnit. This document is
intended to help make your experience smooth and enjoyable. If you feel
anything should be added or clarified, definitely let us know.
Welcome! Thanks for your interest in contributing to QUnit. This document is intended to help make your experience smooth and enjoyable. If you feel anything should be added or clarified, definitely let us know.

If this is your first time contributing to open-source software, you might want
to take a look at the [GitHub Guides](https://guides.github.com/).
If this is your first time contributing to open-source software, you might want to take a look at the [GitHub Guides](https://guides.github.com/).

If you get stuck or need help, you can always [chat with us](https://gitter.im/qunitjs/qunit).
If you get stuck or need help, you can always [chat with us](https://qunitjs.com/intro/#support).

## Where to begin

Expand All @@ -23,22 +20,13 @@ good ways to gain familiarity with just one or two areas of the code.
You're also welcome to start on any other [open issue](https://github.com/qunitjs/qunit/issues).
Feel free to comment in that case to ask for directions.

## Contributor License Agreement

As a first step, in order to contribute to QUnit, you will need to sign the JS
Foundation's [CLA for QUnit](https://cla.js.foundation/qunitjs/qunit).

## Code

For code changes, you'll need to have [Node.js](https://nodejs.org/en/) installed.
For code changes, you'll need to have [Node.js](https://nodejs.org/) installed.

Install dependencies in the repository via `npm ci`. Make your code
changes and run `npm test` which will validate the syntax and coding style,
and run unit and integration tests.
Install dependencies in the repository via `npm install`. Make your code changes and run `npm test` which will validate the syntax and coding style, and run unit and integration tests.

In general, code changes should be accompanied by a unit test to verify the
change in functionality. Once the new tests are passing, make a commit, push it
to your GitHub fork, and create the pull request.
In general, code changes should be accompanied by a unit test to verify the change in functionality. Once the new tests are passing, make a commit, push it to your GitHub fork, and create the pull request.

## Documentation

Expand All @@ -48,11 +36,9 @@ Check [docs/README.md](docs/README.md) for how to locally preview the API docume

## Commit messages

If you're a new contributor, don't worry if you're unsure about
the commit message. The team will edit or write it for you as part
of their code review and merge activities. If you're a regular
contributor, do try to follow this structure as it helps others to
more quickly find, understand, and merge your changes. Thanks!
If you're a new contributor, don't worry if you're unsure about the commit message.

The team will improve it for you as part of their code review and merge activities. If you're a regular contributor, we appreciate you following this structure as it helps everyone to more quickly understand and review your changes, and to summarise them for the changelog. Thanks!

Structure:

Expand All @@ -62,11 +48,10 @@ Component: Short subject line about what is changing
Additional details about the commit are placed after a new line
in the commit message body. That's this paragraph here.

As well as any additional paragraphs. The last block is the footer,
which is reserved for any "Ref", "Fixes" or "Closes" instructions
(one per line).
The last lines are the footer, which is reserved for any "Ref", "Fixes"
or "Closes" commands (one per line).

Fixes #1.
Fixes https://github.com/qunitjs/qunit/issues/1000.
```

The subject line should use the [imperative mood](https://en.wikipedia.org/wiki/Imperative_mood),
Expand All @@ -82,3 +67,7 @@ and start with one of the following components:
* `Test`

See also [Commit message guidelines](https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines).

## Contributor License Agreement

After creating your first pull request, a bot will ask you to sign the JS Foundation's [CLA for QUnit](https://cla.js.foundation/qunitjs/qunit).
13 changes: 13 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env node */
'use strict';

const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -27,6 +28,18 @@ module.exports = function (grunt) {
'src-css': {
src: 'src/core/qunit.css',
dest: 'qunit/qunit.css'
},
'src-export-cjs-wrappers': {
src: 'src/core/qunit-wrapper-bundler-require.js',
expand: true,
flatten: true,
dest: 'qunit/'
},
'src-export-esm-wrappers': {
src: 'src/core/qunit-wrapper-nodejs-module.js',
expand: true,
flatten: true,
dest: 'qunit/esm/'
}
},
search: {
Expand Down
Loading