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

Try chai@next #2176

Closed
wants to merge 212 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
a8ff8a7
chore: changeset
thepassle Aug 8, 2022
043c6e2
Version Packages
github-actions[bot] Aug 8, 2022
96837bf
docs: update link to Playwright CI docs (#2021)
enqueue Aug 10, 2022
7f82655
Keep "Default" stories
Westbrook Aug 12, 2022
252586c
Changeset
Westbrook Aug 13, 2022
7c04c8e
Version Packages
github-actions[bot] Aug 15, 2022
c063780
feat(rollup-plugin-html): support video source tags as assets
daKmoR Aug 16, 2022
2dfaf39
Version Packages
github-actions[bot] Aug 17, 2022
57f0b0a
docs: also mention `@web/test-runner-webdriver` (#2029)
christian-bromann Aug 25, 2022
bffb262
docs: instructions for enabling a11snapshot (#2033)
enqueue Aug 26, 2022
1395d0d
feat(test-runner-commands) add selectOption command for playwright & …
michaelwarren1106 Sep 3, 2022
b577f3e
docs(test-runner-commands) add section for selectOption plugin with e…
michaelwarren1106 Sep 3, 2022
57a0f60
chore(test-runner-commands): remove unneeded imports
michaelwarren1106 Sep 7, 2022
81ed1a3
chore(test-runner-commands): fix formatting
michaelwarren1106 Sep 7, 2022
9266db8
Version Packages
github-actions[bot] Sep 12, 2022
56cba61
docs: mention WebdriverIO as option for headless testing (#2052)
christian-bromann Oct 13, 2022
ec72630
feat: add support for configuring failure threshold (#1879)
WickyNilliams Oct 13, 2022
b608825
Version Packages (#2053)
github-actions[bot] Oct 13, 2022
2cae805
docs: fix small casing issue in the documentation (#2022)
andiwils Oct 13, 2022
937e290
docs: mention possibility for TypeScript path resolving (#2039)
enjikaka Oct 13, 2022
e5f6724
docs: add missing comma to `webdriver` config example (#2030)
christian-bromann Oct 13, 2022
6448b73
chore: format webdriver docs with Prettier
web-padawan Oct 13, 2022
535317e
chore(deps): update dependency concurrently to v7 (#1861)
renovate[bot] Oct 13, 2022
69c9f0b
chore(deps): update dependency @types/whatwg-url to v11 (#2035)
renovate[bot] Oct 14, 2022
51f8b64
test: unskip Selenium and Webdriver tests
web-padawan Jun 30, 2022
6fed38f
feat(dev-server-esbuild): accept banner/footer setting to esbuild tra…
43081j Oct 19, 2022
16216b7
chore: update dev-server-esbuild changeset to patch
web-padawan Oct 19, 2022
592835a
Version Packages (#2058)
github-actions[bot] Oct 19, 2022
fe7db90
fix: update portfinder dependency to 1.0.32 (#2059)
web-padawan Oct 19, 2022
c700360
Version Packages (#2060)
github-actions[bot] Oct 19, 2022
e2bb35a
chore(deps): lock file maintenance (#2061)
renovate[bot] Oct 20, 2022
7cb36f0
feat: update dependency v8-to-istanbul to v9 (#2063)
renovate[bot] Oct 20, 2022
5819cbe
Version Packages (#2064)
github-actions[bot] Oct 20, 2022
f2fe1b9
docs: adds new threshold parameters to README (#2065)
peschee Oct 24, 2022
b418757
chore(deps): bump engine.io from 6.2.0 to 6.2.1 (#2074)
dependabot[bot] Nov 22, 2022
03d9b8c
chore(deps): bump loader-utils from 2.0.2 to 2.0.4 (#2071)
dependabot[bot] Nov 25, 2022
3ce0403
chore: update Lion components to fix search input
web-padawan Nov 30, 2022
29de020
chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#2080)
dependabot[bot] Dec 6, 2022
05d9c30
docs: fix imports in rollupPluginHTML docs examples (#2081)
EvgeniiaVak Dec 7, 2022
743229b
feat(polyfills-loader): add URLPattern polyfill
thepassle Dec 24, 2022
090b55a
Create quiet-dancers-tickle.md
thepassle Dec 24, 2022
987457e
ci: fix test
thepassle Dec 27, 2022
d4be1ed
Version Packages
github-actions[bot] Dec 27, 2022
d2a4313
fix(dev-server-rollup): fix rollup adapter virtual modules resolution…
giamir Dec 4, 2022
8fe33a6
Version Packages
github-actions[bot] Jan 12, 2023
2602633
fix: rollup adapter
thepassle Jan 13, 2023
a23255e
ci: release
thepassle Jan 13, 2023
479e93a
Version Packages
github-actions[bot] Jan 13, 2023
d30d353
fix(polyfills-loader): reverse condition to load the polyfill for con…
thepassle Jan 22, 2023
714133e
Create real-wombats-hear.md
thepassle Jan 22, 2023
bf814a8
Version Packages
github-actions[bot] Jan 22, 2023
2d1ee59
[dev-server-storybook] Load a CommonJS config if one exists
koddsson Feb 13, 2023
1bea4e9
Add a changeset
koddsson Feb 13, 2023
406f6c9
Check if file exists once
koddsson Feb 13, 2023
f5dd4ff
Run format :(
koddsson Feb 13, 2023
78fa72a
Version Packages
github-actions[bot] Feb 14, 2023
6b46987
fix(test-runner): browser logs in summary reporter
bennypowers Feb 21, 2023
8db29a5
style: format
bennypowers Feb 21, 2023
9bd79dc
Add a missing )
koddsson Feb 17, 2023
ae81f01
Version Packages
github-actions[bot] Feb 22, 2023
15b877f
Generate longer self signed keys Closes #2122
flatmax Feb 14, 2023
9cd4f01
Changeset
Westbrook Mar 11, 2023
80bce6e
Fix the typings file name for the main entrypoint
justinfagnani Jan 24, 2023
535c799
fix (dev-server-rollup): support child plugins in resolution algorithm
43081j Oct 7, 2022
60395fa
fix (dev-server-rollup): respect skipSelf
43081j Oct 20, 2022
7742453
fix (dev-server-rollup): fix ImportSkip map order
lucaelin Jan 18, 2023
700a1ee
feat (dev-server-rollup): pass through resolve options
43081j Jan 18, 2023
209080f
feat: extract resolve options to plugin definition
43081j Jan 18, 2023
260fb1b
build: run canary release job with node@16
Westbrook Feb 16, 2023
0720bc1
Include change set
Westbrook Feb 16, 2023
e526993
docs: make watch documentation clearer
Oct 18, 2022
9621a24
feat(dev-server-core): add option to disable the file watcher in the …
Oct 18, 2022
971cb84
feat(test-runner-core): disable file watcher when not in watch mode
Oct 18, 2022
9c511e4
Add changeset
Oct 18, 2022
57a2d39
fix(dev-server-rollup): fix rollup adapter resolution for virtual mod…
akrawitz Jan 17, 2023
b678a75
😊
jpzwarte Mar 10, 2023
812ad63
Version Packages
github-actions[bot] Mar 14, 2023
6076106
fix(deps): update dependency magic-string to ^0.30.0
renovate[bot] Mar 14, 2023
a0e2460
chore(deps): bump ua-parser-js from 1.0.32 to 1.0.33
dependabot[bot] Mar 14, 2023
5423d3a
Changeset
Westbrook Mar 15, 2023
7c81685
chore(deps): update dependency puppeteer-core to v18
renovate[bot] Mar 15, 2023
d2a9535
fix(test-runner): indent nested suites - summaryReporter
oscarmarina Nov 9, 2022
8ee50c1
Changeset
Westbrook Mar 11, 2023
c5e5b0b
fix(test-runner): browser logs in summary reporter
bennypowers Feb 21, 2023
9d611a4
Export the `formatError` function from test-runner
koddsson Feb 8, 2023
a65c088
Format file
koddsson Feb 14, 2023
232602b
chore: add puppeteer-core changeset
tmsns Mar 28, 2023
23873bb
Version Packages
github-actions[bot] Mar 28, 2023
0ee4639
fix(test-runner-core): enable file watcher in manual mode
tmsns Mar 29, 2023
53c034f
fix(test-runner-chrome): fix broken test coverage. fixes #2186
driesva Mar 30, 2023
c340dc2
💅 Run prettier :sparkles:
koddsson Mar 31, 2023
133c21b
fix(deps): update dependency @rollup/plugin-babel to v6
renovate[bot] Mar 15, 2023
0e18740
Add a changeset
koddsson Mar 31, 2023
6a86729
fix(deps): update dependency @rollup/plugin-replace to v4
renovate[bot] Mar 31, 2023
a3b463a
Add changeset
koddsson Mar 31, 2023
bd7dcdf
Increase flaky test timeout
koddsson Mar 31, 2023
f58b453
chore(deps): update dependency alex to v11
renovate[bot] Mar 31, 2023
86d938b
chore(deps): update dependency rimraf to v4
renovate[bot] Mar 31, 2023
d7de106
Use `--glob` when rimraffing with wildcards
koddsson Mar 31, 2023
aecc64b
chore(deps): update dependency puppeteer-core to v19
renovate[bot] Mar 31, 2023
8703efc
Ignore some TypeScript errors
koddsson Mar 31, 2023
8a2ad1f
fix(deps): update dependency @rollup/pluginutils to v5
renovate[bot] Mar 31, 2023
0fa931a
Add changeset
koddsson Mar 31, 2023
8059d27
fix(deps): update dependency @rollup/plugin-replace to v5
renovate[bot] Mar 31, 2023
9bac737
Add changeset
koddsson Mar 31, 2023
1342b65
fix(deps): update dependency browserslist-useragent to v4
renovate[bot] Mar 31, 2023
3eda0b1
Add a changeset
koddsson Mar 31, 2023
02f8d7a
chore(deps): update dependency concurrently to v8
renovate[bot] Mar 29, 2023
753bc7c
Changeset
Westbrook Mar 30, 2023
ec52cd8
fix(deps): update dependency convert-source-map to v2
renovate[bot] Mar 31, 2023
d3db6c5
Add a changeset
koddsson Mar 31, 2023
c592956
fix(deps): update dependency command-line-usage to v7
renovate[bot] Mar 31, 2023
31f4782
Add a changeset
koddsson Mar 31, 2023
069b8ea
fix(deps): update dependency html-minifier-terser to v7
renovate[bot] Mar 31, 2023
454903e
Add changeset
koddsson Mar 31, 2023
9370dcf
fix(deps): update dependency isbinaryfile to v5
renovate[bot] Mar 31, 2023
1f2cf8a
Add changeset
koddsson Mar 31, 2023
2bc32fe
Create dependabot.yml
koddsson Mar 31, 2023
6d58650
Set the weekly dependabot update to run on Thursdays
koddsson Mar 31, 2023
e6e64ff
chore(deps): bump pretty-bytes from 5.6.0 to 6.1.0
dependabot[bot] Mar 31, 2023
a18bbad
Add changeset
koddsson Apr 1, 2023
4e873e0
Update puppeteer
koddsson Apr 1, 2023
d0fc2b3
Add a changeset
koddsson Apr 1, 2023
964e678
Update puppeteer paths in tests
koddsson Apr 1, 2023
7752e28
Change version bump from patch to minor
koddsson Apr 1, 2023
6fbafee
Remove unused variable
koddsson Apr 1, 2023
db0c215
Run `npm run format`
koddsson Apr 1, 2023
5f2db0a
Add `sep` to paths in tests
koddsson Apr 1, 2023
e81d7a0
Add a missing sep
koddsson Apr 2, 2023
3c0d319
change version bump to a patch
koddsson Apr 3, 2023
c2ef889
Disable renovate
koddsson Apr 4, 2023
225f07f
Version Packages
github-actions[bot] Apr 4, 2023
2877321
fix(rollup-plugin-workbox): revert back to non-ESM version of pretty-…
dlockhart Apr 4, 2023
0870ae5
Version Packages
github-actions[bot] Apr 4, 2023
ffdcf37
chore(deps): bump puppeteer from 19.8.2 to 19.9.0
dependabot[bot] Apr 14, 2023
ae65daa
Changeset
Westbrook Apr 15, 2023
efc5676
chore: update all rollup dependencies to run CI with
Westbrook Feb 10, 2023
7422d2b
Force module consumption in Mocha runner
Westbrook Feb 22, 2023
0e7aa80
Force type the TS consumption
Westbrook Feb 24, 2023
d206df3
test: take snapshot updates in rollup-plugin-polyfills-loader
Westbrook Mar 15, 2023
e2c8e01
test: take snapshot updates in rollup-plugin-import-meta
Westbrook Mar 15, 2023
f63b1ff
test: update rollup-plugin-html test values
Westbrook Mar 15, 2023
f009b2c
test: update dev-server-rollup test values
Westbrook Mar 15, 2023
f334ff9
chore: format
Westbrook Mar 15, 2023
1aed621
Changeset
Westbrook Mar 16, 2023
8d28be1
Configure for expected CJS importing
Westbrook Mar 17, 2023
4b3c9ad
chore: bump node ci to 18/20
43081j Mar 21, 2023
25f7f17
test (dev-server-import-maps): loosen assertion to account for diff i…
43081j Mar 21, 2023
f18440b
feat (dev-server-core): upgrade lru-cache
43081j Mar 20, 2023
c6be45b
feat (test-runner-coverage-v8): use lru cache for istanbul converters
43081j Mar 20, 2023
9c98a44
chore: add changeset
43081j Mar 20, 2023
9fae2ed
chore (dev-server-core): fix lru-cache semver
43081j Mar 21, 2023
676469c
chore: run format
43081j Mar 24, 2023
ff2e22c
fix: specify maxsize
43081j Mar 24, 2023
75be14d
Deprecate node 14
koddsson Mar 31, 2023
e694f52
Add a changeset
koddsson Mar 31, 2023
6d3f5c9
Update version bumps in changeset
koddsson Apr 1, 2023
78a11cd
Bump `@web/rollup-plugin-workbox`
koddsson Apr 3, 2023
fb6cf04
Update .changeset/fuzzy-terms-push.md
koddsson Apr 4, 2023
90905d3
Update to mocha@10 in `test-runner-commands`
koddsson Mar 28, 2023
3f6bb4e
Update to `mocha@10` in `test-runner-visual-regression`
koddsson Mar 28, 2023
20d550e
Update to `mocha@10` in `test-runner-mocha`
koddsson Mar 28, 2023
d82f46a
Update to `mocha@10` in project root.
koddsson Apr 7, 2023
8a49472
Actually just import mocha
koddsson Apr 14, 2023
1308d61
Maybe fix imports?
koddsson Apr 14, 2023
270e18e
Get mocha from window
koddsson Apr 15, 2023
16e32aa
Install mocha in `dev-server-rollup`
koddsson Apr 15, 2023
6162b43
Try fixing mocha imports once more
koddsson Apr 15, 2023
4de595a
Update stacktrace in expected XML
koddsson Apr 15, 2023
c6aac61
Add a changeset
koddsson Apr 15, 2023
9668c8c
Fix yarn.lock
koddsson Apr 15, 2023
d2ee16b
Upgrade TypeScript to version 4.2
koddsson Apr 16, 2023
e385528
Update hash in test snapshot
koddsson Apr 16, 2023
f523a8c
Tweak release level.
Westbrook Apr 20, 2023
3177d3e
Unskip test not that we have upgraded the rollup plugin
koddsson Apr 20, 2023
043f153
Fix workflow bade in README
koddsson Apr 20, 2023
0729101
Version Packages
github-actions[bot] Apr 20, 2023
98a387f
Upgrade TypeScript to 4.7.4
justinfagnani Aug 25, 2022
9632ea7
Add empty changeset
justinfagnani Aug 25, 2022
b3c0138
Cast errors to `PluginSyntaxError`
koddsson Mar 23, 2023
c3b34a6
Import types as types
koddsson Mar 24, 2023
c523b6f
Revert console object assignment
koddsson Mar 24, 2023
3efef5c
Add changeset
koddsson Apr 21, 2023
4430943
Update some dependencies
koddsson Apr 21, 2023
d837c4e
Update more
koddsson Apr 21, 2023
4ba6b6f
Downgrade `@rollup/plugin-commonjs`
koddsson Apr 21, 2023
10f5dfb
Update `webdriver` to version 8
koddsson Apr 23, 2023
5891bd9
Fix types
koddsson Apr 23, 2023
b763c81
Add a changeset
koddsson Apr 23, 2023
3520125
Update to TypeScript 4.8
koddsson Apr 23, 2023
56d7c2c
Upgrade to TypeScript 4.9
koddsson Apr 23, 2023
b07e280
Version Packages
github-actions[bot] Apr 23, 2023
33e2bdd
Upgrade to TypeScript 5
koddsson Apr 23, 2023
763f488
Add a changeset
koddsson Apr 21, 2023
89ded70
Update some dependencies
koddsson Apr 21, 2023
99d7f50
Upgrade `@rocket/cli`
koddsson Mar 25, 2023
6d6c73e
Replace various chai versions with `chai@v5`
koddsson Mar 24, 2023
36a9396
s/@esm-bundle\/chai/chai/
koddsson Mar 24, 2023
6cd6321
Fix reference to chai
koddsson Mar 24, 2023
33a4fa1
Make package a module
koddsson Mar 24, 2023
6e7a206
Install chai types
koddsson Mar 24, 2023
45d81b9
Fix the imports more
koddsson Mar 24, 2023
e319ffd
f0rmAT
koddsson Mar 24, 2023
9a79e63
Fix chai imports in junit reporter
koddsson Mar 25, 2023
ce4da07
Update some docs
koddsson Mar 25, 2023
3e7d7bf
Fix chai import/export for test-runner demo tests
koddsson Mar 25, 2023
7ccf678
Update expected test results
koddsson Apr 20, 2023
58e3957
Remove query-string from test failure test
koddsson Apr 24, 2023
2c42246
Remove `type` key from `package.json`
koddsson Apr 24, 2023
0abbe14
Add query-string back lol
koddsson Apr 24, 2023
8efe461
Merge branch 'master' of github.com:modernweb-dev/web into try-chai-next
koddsson Aug 1, 2023
39ea02b
update to latest chai version
koddsson Aug 1, 2023
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
15 changes: 15 additions & 0 deletions .changeset/clever-monkeys-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@web/browser-logs': minor
'@web/dev-server-import-maps': minor
'@web/dev-server-rollup': minor
'@web/test-runner': minor
'@web/test-runner-browserstack': minor
'@web/test-runner-commands': minor
'@web/test-runner-core': minor
'@web/test-runner-junit-reporter': minor
'@web/test-runner-saucelabs': minor
'@web/test-runner-selenium': minor
'@web/test-runner-webdriver': minor
---

Update Chai to version 5.
10 changes: 5 additions & 5 deletions docs/blog/introducing-web-test-runner/index.md.review
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This is the minimal instruction on how to start using the web test runner.
1. Install the necessary packages

```
npm i --save-dev @web/test-runner @esm-bundle/chai
npm i --save-dev @web/test-runner chai
```

2. Add a script to your `package.json`
Expand All @@ -50,7 +50,7 @@ This is the minimal instruction on how to start using the web test runner.
3. Create a test file `test/sum.test.js`.

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { sum } from '../src/sum.js';

it('sums up 2 numbers', () => {
Expand Down Expand Up @@ -189,7 +189,7 @@ npm i --save-dev @web/test-runner-commands
With that, we get a `setViewport` method which we can use.

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { setViewport } from '@web/test-runner-commands';
import { isMobile } from '../src/isMobile';

Expand Down Expand Up @@ -236,7 +236,7 @@ See more instructions in the [Code Coverage Guide](../../guides/test-runner/code
First, we need to install the required dependencies:

```
npm i --save-dev @web/test-runner @esm-bundle/chai @types/mocha typescript
npm i --save-dev @web/test-runner chai @types/mocha typescript
```

Add the `src/sum.ts` file:
Expand All @@ -254,7 +254,7 @@ export function sum(...numbers: number[]) {
Add the `test/sum.test.ts` file:

```ts
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { sum } from '../src/sum.js';

it('sums up 2 numbers', () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/dev-server/plugins/import-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ When the plugin is installed any import maps found in HTML files are used to res
<script type="importmap">
{
"imports": {
"chai": "/node_modules/@esm-bundle/chai/chai.js",
"chai": "/node_modules/chai/chai.js",
"./app.js": "./mocked-app.js"
}
}
Expand All @@ -74,7 +74,7 @@ When the plugin is installed any import maps found in HTML files are used to res

<body>
<script type="module">
// mapped to /node_modules/@esm-bundle/chai/chai.js
// mapped to /node_modules/chai/chai.js
import chai from 'chai';
// mapped to ./mocked-app.js
import app from './app.js';
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/test-runner/writing-tests/helper-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Not all helper libraries ship es modules which are usable in the browser. On thi

## Assertions

[chai](https://www.npmjs.com/package/chai) is a popular assertion library. It doesn't ship an es module, but you can use [@esm-bundle/chai](https://www.npmjs.com/package/@esm-bundle/chai) for that.
[chai](https://www.npmjs.com/package/chai) is a popular assertion library.

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';

expect(undefined).to.not.be.a('function');
```
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/test-runner/writing-tests/html-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ With mocha, you need to define your tests inside the `runTests` function:
<body>
<script type="module">
import { runTests } from '@web/test-runner-mocha';
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';

runTests(async () => {
// write your tests inline
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/test-runner/writing-tests/js-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Javascript files are loaded by the test framework that is configured. The defaul
For example:

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { myFunction } from '../src/myFunction.js';

describe('myFunction', () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/test-runner/writing-tests/mocking.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Test file:
<body>
<script type="module">
import { runTests } from '@web/test-runner-mocha';
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
// import inside will resolve to ./mocks/postData.js
import { sendMessage } from '../src/sendMessage.js';
// resolves to ./mocks/postData.js
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/going-buildless/es-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ UMD modules are "universal modules", meaning they support multiple module format

You can actually import these libraries using a module import, but instead of exporting something, the UMD module will register itself to the window. You can set up a proxy file to reexport this variable from the window.

A good example of this is the chai library:
A good example of this is how the chai library used to work before it started shipping ES Modules:

`test/chai.js`:

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/test-runner/code-coverage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ As good citizens we start with the tests first
👉 `test/calc.test.js`

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { calc } from '../src/calc.js';

it('does plus for 2 numbers', () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/test-runner/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Now that we know what we want we need to place this file somewhere and run a too
1. Install the necessary packages

```
npm i --save-dev @web/test-runner @esm-bundle/chai
npm i --save-dev @web/test-runner chai
```

2. Add a script to your `package.json`
Expand Down Expand Up @@ -56,7 +56,7 @@ fair enough - we didn't create a test file yet.
1. Take the spec/test from above and create a test file `test/sum.test.js`.

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { sum } from '../src/sum.js';

it('sums up 2 numbers', () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/test-runner/responsive.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npm i --save-dev @web/test-runner-commands
With that we get a `setViewport` method which we can put to good use.

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { setViewport } from '@web/test-runner-commands';
import { isMobile } from '../src/isMobile';

Expand Down Expand Up @@ -110,7 +110,7 @@ Next, we can write our tests to change the viewport and check if our media queri

<script type="module">
import { runTests } from '@web/test-runner-mocha';
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { setViewport } from '@web/test-runner-commands';

runTests(() => {
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/test-runner/watch-and-debug/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ We want to be able to pass in a string like `1 + 2 + 3` to get its sum.
👉 `test/calc.test.js`

```js
import { expect } from '@esm-bundle/chai';
import { expect } from 'chai';
import { calc } from '../src/calc.js';

it('calculates sums', () => {
Expand Down
3 changes: 1 addition & 2 deletions integration/test-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"author": "modern-web",
"homepage": "https://github.com/modernweb-dev/web/tree/master/packages/test-runner-integration-tests",
"main": "index.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unrelated to the chai changes. I was just getting warnings when running the tests:

(node:87634) [DEP0128] DeprecationWarning: Invalid 'main' field in '/src/web/integration/test-runner/package.json' of 'index.js'. Please either fix that or report it to the module author

"scripts": {
"test": "mocha test/**/*.test.ts --require ts-node/register --reporter dot",
"test:watch": "mocha test/**/*.test.ts --require ts-node/register --watch --watch-files src,test --reporter dot"
Expand All @@ -24,6 +23,6 @@
"@web/test-runner-core": "^0.11.2"
},
"devDependencies": {
"@esm-bundle/chai": "^4.1.5"
"chai": "^5.0.0-alpha.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<body>
<script type="module">
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';
import { runTests } from '../../../../../packages/test-runner-mocha/dist/standalone.js';

runTests(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

describe('basic test', () => {
it('works', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('supports object spread', () => {
const foo = { a: 1 };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';
import module from './module-features-a.js';

it('supports static imports', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

describe('basic test', () => {
it('works', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

describe('basic test', () => {
it('works', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('can run a test with focus a', async () => {
const input = document.createElement('input');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('can run a test with focus b', async () => {
const input = document.createElement('input');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('can run a test with focus c', async () => {
const input = document.createElement('input');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('can run a test with focus d', async () => {
const input = document.createElement('input');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('can run a test with focus e', async () => {
const input = document.createElement('input');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

afterEach(() => {
throw new Error('error thrown in afterEach hook');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

after(() => {
throw new Error('error thrown in after hook');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

beforeEach(() => {
throw new Error('error thrown in beforeEach hook');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

before(() => {
throw new Error('error thrown in before hook');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('bad predicate', function() {
const fixture = { x: 'x' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

throw new Error('This is thrown before running tests');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';
import './shared-a.js';

it('object diff A', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js';
import { expect } from '../../../../../node_modules/chai/chai.js';

it('string diff', () => {
expect('foo').to.equal('bar');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function runTestFailureTest(
expect(session.testResults!.suites.length).to.equal(0);
expect(session.testResults!.tests.length).to.equal(0);
expect(session.request404s).to.eql([
'integration/test-runner/tests/test-failure/browser-tests/non-existing.js',
'integration/test-runner/tests/test-failure/browser-tests/non-existing.js?systemjs=true',
]);
expect(session.errors).to.eql([ERROR_NOT_IMPORTABLE]);
expect(session.logs.length).to.equal(1);
Expand Down
Loading
Loading