polendina 3.2.26 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/resources/mocha-run.js +4 -3
- package/test/fixtures/mocha/package.json +1 -1
- package/test/fixtures/mocha-esm/package.json +1 -1
- package/test/fixtures/mocha-failure/package.json +1 -1
- package/test/fixtures/mocha-failure-esm/package.json +1 -1
- package/test/test-mocha.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [3.3.0](https://github.com/rvagg/polendina/compare/v3.2.26...v3.3.0) (2026-09-21)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **mocha:** support mocha@12 while maintaining 11 support ([#201](https://github.com/rvagg/polendina/issues/201)) ([0d05415](https://github.com/rvagg/polendina/commit/0d05415be4faeac5e53d378b87a1ac787c27a58f))
|
|
6
|
+
|
|
1
7
|
## [3.2.26](https://github.com/rvagg/polendina/compare/v3.2.25...v3.2.26) (2026-07-30)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/package.json
CHANGED
package/resources/mocha-run.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// in-browser setup and runner for Mocha, at end of bundle
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// the browser bundle is UMD in mocha<=11 and an ES module in mocha>=12; both set
|
|
4
|
+
// the instance on the global, so that's our lowest common denominator
|
|
5
|
+
import 'mocha/mocha.js'
|
|
4
6
|
import { registry, executionQueue, log, setup } from './common-run.js'
|
|
5
7
|
|
|
6
8
|
async function runMocha () {
|
|
7
|
-
|
|
8
|
-
const mochaLocal = mochaExport
|
|
9
|
+
const mochaLocal = globalThis.mocha
|
|
9
10
|
mochaLocal.setup({ reporter: registry.argv.mochaReporter, ui: 'bdd' })
|
|
10
11
|
// mocha@7 deprecated useColors()
|
|
11
12
|
if (typeof mochaLocal.color === 'function') {
|
package/test/test-mocha.js
CHANGED
|
@@ -19,15 +19,15 @@ for (const type of ['cjs', 'esm']) {
|
|
|
19
19
|
this.timeout(60000)
|
|
20
20
|
const expectedTemplate = `
|
|
21
21
|
test suite 1
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
✔ test case 1
|
|
23
|
+
✔ test case 2
|
|
24
24
|
|
|
25
25
|
test suite 2 - worker
|
|
26
|
-
|
|
26
|
+
✔ is WORKER
|
|
27
27
|
|
|
28
28
|
test suite 3
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
✔ test case 1
|
|
30
|
+
✔ test case 2
|
|
31
31
|
`
|
|
32
32
|
|
|
33
33
|
it('should run in page', async () => {
|
|
@@ -106,7 +106,7 @@ for (const type of ['cjs', 'esm']) {
|
|
|
106
106
|
this.timeout(60000)
|
|
107
107
|
const expectedTemplate = `
|
|
108
108
|
test suite 1 - worker
|
|
109
|
-
|
|
109
|
+
✔ is WORKER
|
|
110
110
|
|
|
111
111
|
test suite 2 - failing
|
|
112
112
|
1) should fail
|