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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polendina",
3
- "version": "3.2.26",
3
+ "version": "3.3.0",
4
4
  "description": "Non-UI browser testing for JavaScript libraries from the command-line",
5
5
  "main": "polendina.js",
6
6
  "type": "module",
@@ -1,11 +1,12 @@
1
1
  // in-browser setup and runner for Mocha, at end of bundle
2
2
 
3
- import mochaExport from 'mocha/mocha.js'
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
- // mocha@8 exports what we want, mocha@7 sets a global
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') {
@@ -14,6 +14,6 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "chai": "^6.0.1",
17
- "mocha": "^11.0.1"
17
+ "mocha": "^12.0.2"
18
18
  }
19
19
  }
@@ -15,6 +15,6 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "chai": "^6.0.1",
18
- "mocha": "^11.0.1"
18
+ "mocha": "^12.0.2"
19
19
  }
20
20
  }
@@ -14,6 +14,6 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "chai": "^6.0.1",
17
- "mocha": "^11.0.1"
17
+ "mocha": "^12.0.2"
18
18
  }
19
19
  }
@@ -15,6 +15,6 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "chai": "^6.0.1",
18
- "mocha": "^11.0.1"
18
+ "mocha": "^12.0.2"
19
19
  }
20
20
  }
@@ -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
- ✅ test case 1
23
- ✅ test case 2
22
+ ✔ test case 1
23
+ ✔ test case 2
24
24
 
25
25
  test suite 2 - worker
26
- ✅ is WORKER
26
+ ✔ is WORKER
27
27
 
28
28
  test suite 3
29
- ✅ test case 1
30
- ✅ test case 2
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
- ✅ is WORKER
109
+ ✔ is WORKER
110
110
 
111
111
  test suite 2 - failing
112
112
  1) should fail