Changeset View
Changeset View
Standalone View
Standalone View
cypress/plugins/index.js
Show All 36 Lines | return { | ||||
'revision': lastOriginHeadRevision.id, | 'revision': lastOriginHeadRevision.id, | ||||
'snapshot': lastOriginSnapshot.id | 'snapshot': lastOriginSnapshot.id | ||||
}; | }; | ||||
}; | }; | ||||
function getDatabase() { | function getDatabase() { | ||||
const db = new sqlite3.Database(`./swh-web-test${buildId}.sqlite3`); | const db = new sqlite3.Database(`./swh-web-test${buildId}.sqlite3`); | ||||
// to prevent "database is locked" error when running tests | // to prevent "database is locked" error when running tests | ||||
db.configure('busyTimeout', 20000); | |||||
db.run('PRAGMA journal_mode = WAL;'); | db.run('PRAGMA journal_mode = WAL;'); | ||||
return db; | return db; | ||||
} | } | ||||
module.exports = (on, config) => { | module.exports = (on, config) => { | ||||
require('@cypress/code-coverage/task')(on, config); | require('@cypress/code-coverage/task')(on, config); | ||||
// produce JSON files prior launching browser in order to dynamically generate tests | // produce JSON files prior launching browser in order to dynamically generate tests | ||||
on('before:browser:launch', function(browser, launchOptions) { | on('before:browser:launch', function(browser, launchOptions) { | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |