expo-sqlite-mock 2.0.0 → 2.0.1

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.
Files changed (3) hide show
  1. package/README.md +11 -0
  2. package/package.json +1 -1
  3. package/src/setup.ts +6 -11
package/README.md CHANGED
@@ -14,3 +14,14 @@ Use expo-sqlite with jest.
14
14
 
15
15
  1. `npm install -D expo-sqlite-mock` or `bun add -D expo-sqlite-mock`
16
16
  2. Add `"setupFilesAfterEnv": ["expo-sqlite-mock/src/setup.ts"]` and `"testTimeout": 10000` to your jest config (It's in `package.json` for default expo project).
17
+
18
+ ## Changelog
19
+
20
+ - **2.0.1**
21
+ - Fix setup.
22
+
23
+ - **2.0.0**
24
+ - Update for expo-sqlite ~52.
25
+
26
+ - **1.0.0**
27
+ - Initial version.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-sqlite-mock",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/zfben/expo-sqlite-mock",
6
6
  "repository": {
package/src/setup.ts CHANGED
@@ -1,13 +1,8 @@
1
1
  import { mockedExpoSqliteNext } from './ExpoSQLiteNext'
2
- import { existsSync } from 'node:fs'
3
2
 
4
- if (existsSync(`${__dirname}/../../expo-sqlite/build/ExpoSQLiteNext`))
5
- jest.mock(`${__dirname}/../../expo-sqlite/build/ExpoSQLiteNext`, () => mockedExpoSqliteNext)
6
- else {
7
- jest.mock(`${__dirname}/../../expo-sqlite/build/ExpoSQLite`, () => mockedExpoSqliteNext)
8
- jest.mock(`${__dirname}/../../expo-sqlite/build/pathUtils`, () => ({
9
- createDatabasePath: jest.fn().mockImplementation((databaseName: string) => {
10
- return databaseName
11
- }),
12
- }))
13
- }
3
+ jest.mock(`${__dirname}/../../expo-sqlite/build/ExpoSQLite`, () => mockedExpoSqliteNext)
4
+ jest.mock(`${__dirname}/../../expo-sqlite/build/pathUtils`, () => ({
5
+ createDatabasePath: jest.fn().mockImplementation((databaseName: string) => {
6
+ return databaseName
7
+ }),
8
+ }))