Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Commit c18b5af

Browse files
committed
🔧 (reactive) Configure mobx and add rxjs
1 parent b84141a commit c18b5af

5 files changed

Lines changed: 27 additions & 0 deletions

File tree

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = {
22
presets: ['module:metro-react-native-babel-preset'],
3+
plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]],
34
};

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = {
22
preset: 'react-native',
33
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
44
modulePathIgnorePatterns: ['<rootDir>/example'],
5+
setupFilesAfterEnv: ['./jest/setup.js'],
56
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
67
collectCoverage: true,
78
coverageThreshold: {

jest/setup.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { configure } from 'mobx';
2+
3+
configure({
4+
enforceActions: 'always',
5+
});
6+
7+
Date.now = jest.fn(() => 0);

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@babel/core": "^7.4.3",
33+
"@babel/plugin-proposal-decorators": "^7.4.0",
3334
"@babel/runtime": "^7.4.3",
3435
"@types/jest": "^24.0.11",
3536
"@types/react-native": "^0.57.43",
@@ -47,6 +48,7 @@
4748
"react-native": "0.59.5",
4849
"react-test-renderer": "^16.8.6",
4950
"release-it": "^10.4.2",
51+
"rxjs": "^6.4.0",
5052
"tslint": "^5.15.0",
5153
"typescript": "^3.4.3"
5254
},

yarn.lock

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,15 @@
303303
"@babel/helper-create-class-features-plugin" "^7.4.0"
304304
"@babel/helper-plugin-utils" "^7.0.0"
305305

306+
"@babel/plugin-proposal-decorators@^7.4.0":
307+
version "7.4.0"
308+
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz#8e1bfd83efa54a5f662033afcc2b8e701f4bb3a9"
309+
integrity sha512-d08TLmXeK/XbgCo7ZeZ+JaeZDtDai/2ctapTRsWWkkmy7G/cqz8DQN/HlWG7RR4YmfXxmExsbU3SuCjlM7AtUg==
310+
dependencies:
311+
"@babel/helper-create-class-features-plugin" "^7.4.0"
312+
"@babel/helper-plugin-utils" "^7.0.0"
313+
"@babel/plugin-syntax-decorators" "^7.2.0"
314+
306315
"@babel/plugin-proposal-export-default-from@^7.0.0":
307316
version "7.2.0"
308317
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.2.0.tgz#737b0da44b9254b6152fe29bb99c64e5691f6f68"
@@ -350,6 +359,13 @@
350359
dependencies:
351360
"@babel/helper-plugin-utils" "^7.0.0"
352361

362+
"@babel/plugin-syntax-decorators@^7.2.0":
363+
version "7.2.0"
364+
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.2.0.tgz#c50b1b957dcc69e4b1127b65e1c33eef61570c1b"
365+
integrity sha512-38QdqVoXdHUQfTpZo3rQwqQdWtCn5tMv4uV6r2RMfTqNBuv4ZBhz79SfaQWKTVmxHjeFv/DnXVC/+agHCklYWA==
366+
dependencies:
367+
"@babel/helper-plugin-utils" "^7.0.0"
368+
353369
"@babel/plugin-syntax-dynamic-import@^7.0.0":
354370
version "7.2.0"
355371
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612"

0 commit comments

Comments
 (0)