mirror of
https://git.cloudron.io/cloudron/syncthing-app
synced 2026-04-24 11:24:59 +00:00
Replace expect.js with node:assert/strict
expect.js is unmaintained and unnecessary — Node's built-in assert module covers all our assertion patterns. This also removes expect.js from package.json dependencies. Made-with: Cursor
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
require('chromedriver');
|
||||
|
||||
const execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
assert = require('node:assert/strict'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
timers = require('timers/promises'),
|
||||
@@ -50,7 +50,7 @@ describe('Application life cycle test', function () {
|
||||
|
||||
const currentUrl = await browser.getCurrentUrl();
|
||||
if (!currentUrl.includes(app.domain)) return;
|
||||
expect(this.currentTest.title).to.be.a('string');
|
||||
assert.strictEqual(typeof this.currentTest.title, 'string');
|
||||
|
||||
const screenshotData = await browser.takeScreenshot();
|
||||
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
|
||||
@@ -59,7 +59,7 @@ describe('Application life cycle test', function () {
|
||||
function getAppInfo() {
|
||||
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
assert.ok(app && typeof app === 'object');
|
||||
}
|
||||
|
||||
async function waitForElement(elem) {
|
||||
|
||||
Reference in New Issue
Block a user