Updated mocha, tests now work with node 20 (#2122)

* Updated mocha, tests now work with node 20

* Update package-lock.json

* Enable Node CI for v2.0v2.0 branch (#2123)

Run tests for v2.0v2.0 branch too

* Bump CI's node version to 20.x
This commit is contained in:
Vincent 2023-12-21 22:54:02 +01:00 committed by GitHub
parent 67cfbcf6bc
commit 23d473291d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1267 additions and 4545 deletions

View File

@ -2,9 +2,9 @@ name: Node CI
on:
push:
branches: [ master, dev, htmx-2.0 ]
branches: [ master, dev, htmx-2.0, v2.0v2.0 ]
pull_request:
branches: [ master, dev, htmx-2.0 ]
branches: [ master, dev, htmx-2.0, v2.0v2.0 ]
jobs:
test_suite:
@ -14,6 +14,6 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '15.x'
node-version: '20.x'
- run: npm ci
- run: npm test

5787
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -63,15 +63,15 @@
}
},
"devDependencies": {
"chai": "^4.3.7",
"chai-dom": "^1.11.0",
"chai": "^4.3.10",
"chai-dom": "^1.12.0",
"eslint": "^8.56.0",
"eslint-config-standard": "^17.1.0",
"fs-extra": "^9.1.0",
"mocha": "^9.2.2",
"mocha-chrome": "^2.2.0",
"mocha-webdriver-runner": "^0.6.4",
"mock-socket": "^9.2.1",
"mocha": "10.1.0",
"mocha-chrome": "https://github.com/Telroshan/mocha-chrome",
"mocha-webdriver": "^0.3.2",
"mock-socket": "^9.3.1",
"sinon": "^9.2.4",
"typescript": "^4.9.5",
"uglify-js": "^3.17.4",

View File

@ -1,4 +1,5 @@
describe('Core htmx AJAX headers', function() {
const chai = window.chai
beforeEach(function() {
this.server = makeServer()
clearWorkArea()

View File

@ -1,4 +1,5 @@
describe('Core htmx internals Tests', function() {
const chai = window.chai
beforeEach(function() {
this.server = makeServer()
clearWorkArea()

View File

@ -1,4 +1,5 @@
describe('Core htmx perf Tests', function() {
const chai = window.chai
var HTMX_HISTORY_CACHE_NAME = 'htmx-history-cache'
beforeEach(function() {

View File

@ -32,7 +32,7 @@
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/chai-dom/chai-dom.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/mocha-webdriver-runner/dist/mocha-webdriver-client.js"></script>
<script src="../node_modules/mocha-webdriver/dist/index.js"></script>
<script src="../node_modules/sinon/pkg/sinon.js"></script>
<script src="../node_modules/mock-socket/dist/mock-socket.js"></script>
<script src="../src/htmx.js"></script>
@ -49,7 +49,7 @@
<script class="mocha-init">
mocha.setup('bdd');
mocha.checkLeaks();
should = chai.should();
window.should = window.chai.should()
</script>
<script src="util/util.js"></script>