Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atomrc authored and dependabot[bot] committed Feb 14, 2024
1 parent 624657a commit 7ca3700
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/store-engine-dexie/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,16 @@

const baseConfig = require('../../jest.config.base');

const { TextDecoder, TextEncoder } = require('util')

const {TextDecoder, TextEncoder} = require('util');

module.exports = {
...baseConfig,
moduleNameMapper: {
'^dexie$': require.resolve('dexie'),
},
setupFiles: [
"fake-indexeddb/auto"
],
setupFiles: ['./jest.setup.js'],
globals: {
TextDecoder,
TextEncoder,
}
},
};

21 changes: 21 additions & 0 deletions packages/store-engine-dexie/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Wire
* Copyright (C) 2024 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

require('core-js/stable/structured-clone');
require('fake-indexeddb/auto');
1 change: 1 addition & 0 deletions packages/store-engine-dexie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@types/node": "^20.1.0",
"@types/rimraf": "^3.0.2",
"@wireapp/store-engine": "workspace:^",
"core-js": "^3.36.0",
"fake-indexeddb": "^5.0.2",
"jest": "^29.2.1",
"logdown": "3.3.1",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5510,6 +5510,7 @@ __metadata:
"@types/node": ^20.1.0
"@types/rimraf": ^3.0.2
"@wireapp/store-engine": "workspace:^"
core-js: ^3.36.0
dexie: ^3.2.0
fake-indexeddb: ^5.0.2
jest: ^29.2.1
Expand Down Expand Up @@ -7893,6 +7894,13 @@ __metadata:
languageName: node
linkType: hard

"core-js@npm:^3.36.0":
version: 3.36.0
resolution: "core-js@npm:3.36.0"
checksum: 48c807d5055ad0424f52d13583e96ddca2efcdc4e3cd9c479d60f269c8fe225191cd4e26a4593f43f7ef6dba08d161091147ecf8ae0300c15bc648a4f555217b
languageName: node
linkType: hard

"core-js@npm:^3.6.4":
version: 3.26.1
resolution: "core-js@npm:3.26.1"
Expand Down

0 comments on commit 7ca3700

Please sign in to comment.