|
8 | 8 | ], |
9 | 9 | "type": "module", |
10 | 10 | "browser": "./src/lib.browser.js", |
| 11 | + "react-native": "./src/lib.react-native.js", |
11 | 12 | "main": "./src/lib.cjs", |
12 | 13 | "module": "./src/lib.js", |
13 | 14 | "types": "./src/lib.d.ts", |
|
21 | 22 | "scripts": { |
22 | 23 | "test:node": "mocha test/test-*.spec.cjs", |
23 | 24 | "test:browser": "playwright-test test/test-*.cjs", |
24 | | - "test:es": "mocha test/test-*.spec.js", |
| 25 | + "test:react-native": "jest test/test-lib.react-native.spec.js", |
| 26 | + "test:es": "mocha test/test-lib.spec.js", |
25 | 27 | "test:cjs": "npm run test:node && npm run test:browser", |
26 | 28 | "test:types:ts": "npm test --prefix test/ts-use", |
27 | 29 | "test:types:esm": "npm test --prefix test/esm-use", |
28 | 30 | "test:types:cjs": "npm test --prefix test/cjs-use", |
29 | 31 | "test:types": "npm run test:types:ts && npm run test:types:esm && npm run test:types:cjs", |
30 | | - "test": "npm run test:es && npm run test:cjs && npm run test:types" |
| 32 | + "test": "npm run test:es && npm run test:cjs && npm run test:react-native && npm run test:types" |
31 | 33 | }, |
32 | 34 | "license": "MIT", |
33 | 35 | "author": "Irakli Gozalishvili <[email protected]>", |
34 | 36 | "homepage": "https://github.com/gozala/web-encoding", |
35 | 37 | "devDependencies": { |
| 38 | + "jest": "^26.6.3", |
| 39 | + "metro-react-native-babel-preset": "^0.64.0", |
36 | 40 | "mocha": "8.2.1", |
37 | | - "playwright-test": "1.2.0" |
| 41 | + "playwright-test": "1.2.0", |
| 42 | + "react-native": "^0.63.4" |
| 43 | + }, |
| 44 | + "optionalDependencies": { |
| 45 | + "@zxing/text-encoding": "0.9.0" |
| 46 | + }, |
| 47 | + "jest": { |
| 48 | + "preset": "react-native", |
| 49 | + "transform": { |
| 50 | + "\\.js$": [ |
| 51 | + "babel-jest", |
| 52 | + { |
| 53 | + "presets": [ |
| 54 | + "module:metro-react-native-babel-preset" |
| 55 | + ] |
| 56 | + } |
| 57 | + ] |
| 58 | + } |
38 | 59 | } |
39 | 60 | } |
0 commit comments