starting with the initial state
This commit is contained in:
parent
ef5751eb69
commit
f2468e3b82
50
package.json
50
package.json
@ -2,48 +2,10 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "./dist",
|
"types": "./dist",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@yanick/updeep": "link:../updeep",
|
"remeda": "^1.0.1"
|
||||||
"lodash": "^4.17.21",
|
|
||||||
"lodash-es": "^4.17.21",
|
|
||||||
"moize": "^6.1.0",
|
|
||||||
"redux": "^4.0.5",
|
|
||||||
"ts-action": "^11.0.0",
|
|
||||||
"updeep": "^1.2.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/cli": "^7.8.4",
|
|
||||||
"@babel/core": "^7.15.5",
|
|
||||||
"@babel/plugin-transform-modules-commonjs": "^7.15.4",
|
|
||||||
"@babel/preset-env": "^7.8.7",
|
|
||||||
"@babel/preset-typescript": "^7.15.0",
|
|
||||||
"@types/jest": "^27.0.2",
|
|
||||||
"@types/lodash": "^4.14.149",
|
|
||||||
"@types/sinon": "^7.5.2",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^2.23.0",
|
|
||||||
"@typescript-eslint/parser": "^2.23.0",
|
|
||||||
"better-docs": "^2.3.2",
|
|
||||||
"docsify": "^4.11.2",
|
|
||||||
"docsify-cli": "^4.4.0",
|
|
||||||
"docsify-tools": "^1.0.20",
|
|
||||||
"dtslint": "^3.3.0",
|
|
||||||
"eslint": "^6.8.0",
|
|
||||||
"eslint-config-prettier": "^6.10.0",
|
|
||||||
"eslint-plugin-import": "^2.20.1",
|
|
||||||
"eslint-plugin-prettier": "^3.1.2",
|
|
||||||
"glob": "^7.1.6",
|
|
||||||
"jest": "^27.2.5",
|
|
||||||
"jsdoc": "^3.6.7",
|
|
||||||
"prettier": "^2.4.1",
|
|
||||||
"promake": "^3.1.3",
|
|
||||||
"sinon": "^9.0.1",
|
|
||||||
"standard-version": "^8.0.0",
|
|
||||||
"tap": "15",
|
|
||||||
"ts-node": "^8.10.2",
|
|
||||||
"tsd": "^0.17.0",
|
|
||||||
"typedoc": "0.22.5",
|
|
||||||
"typescript": "^4.4.4"
|
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"name": "updux",
|
"name": "updux",
|
||||||
"description": "Updeep-friendly Redux helper framework",
|
"description": "Updeep-friendly Redux helper framework",
|
||||||
@ -68,9 +30,9 @@
|
|||||||
"url": "https://github.com/yanick/updux/issues"
|
"url": "https://github.com/yanick/updux/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/yanick/updux#readme",
|
"homepage": "https://github.com/yanick/updux#readme",
|
||||||
"prettier": {
|
"types": "./dist/index.d.ts",
|
||||||
"tabWidth": 4,
|
"devDependencies": {
|
||||||
"singleQuote": true,
|
"typescript": "^4.7.4",
|
||||||
"trailingComma": "es5"
|
"vitest": "^0.22.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
src/Updux.ts
Normal file
4
src/Updux.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
export class Updux {
|
||||||
|
|
||||||
|
}
|
@ -1,12 +1,17 @@
|
|||||||
|
import { test, expect } from 'vitest';
|
||||||
|
|
||||||
import { Updux } from './Updux.js';
|
import { Updux } from './Updux.js';
|
||||||
|
|
||||||
test('initial', () => {
|
const foo = new Updux({
|
||||||
const foo = new Updux({
|
|
||||||
initial: { root: 'abc' },
|
initial: { root: 'abc' },
|
||||||
subduxes: {
|
subduxes: {
|
||||||
bar: new Updux({ initial: 123 }),
|
bar: new Updux({ initial: 123 }),
|
||||||
},
|
},
|
||||||
});
|
|
||||||
|
|
||||||
expect(foo.initial).toMatchObject({ root: 'abc', bar: 123 });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test( 'initial value', () => {
|
||||||
|
expect(foo.initial).toEqual({
|
||||||
|
root: 'abc',
|
||||||
|
bar: 123
|
||||||
|
})
|
||||||
|
} );
|
||||||
|
Loading…
Reference in New Issue
Block a user