Skip to content

Commit

Permalink
Upgraded @dependable/state
Browse files Browse the repository at this point in the history
  • Loading branch information
sunesimonsen committed Sep 16, 2023
1 parent 19e2ab7 commit f8c4641
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 51 deletions.
15 changes: 3 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@
".": "./dist/dependable-session.esm.js"
},
"types": "./types/state.d.ts",
"files": [
"dist",
"src",
"types"
],
"keywords": [
"dependable",
"observable",
"state",
"session"
],
"files": ["dist", "src", "types"],
"keywords": ["dependable", "observable", "state", "session"],
"scripts": {
"test": "mocha",
"format": "prettier --write '**/*.js'",
Expand Down Expand Up @@ -65,7 +56,7 @@
"unexpected-sinon": "^11.1.0"
},
"dependencies": {
"@dependable/state": "^0.18.1",
"@dependable/state": "^0.19.0",
"just-clone": "^6.1.1"
}
}
18 changes: 0 additions & 18 deletions test/observablesFromSnapshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,4 @@ describe("observablesFromSnapshot", () => {
},
});
});

it("makes new observables initialize from the restored cache", () => {
const main = observable("initial value will be overriden", { id: "main" });

expect(main, "to satisfy", {
plainValue: 42,
nestedArray: [nullObservable, falseObservable],
nestedObject: {
array: arrayObservable,
object: objectObservable,
anonymous: anonymousObservable,
},
anonymous: {
anonymousObservable,
nested: observable(anonymousObservable),
},
});
});
});
21 changes: 0 additions & 21 deletions test/session.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ describe("restoreSession", () => {
expect(text, "to satisfy", "Hello session");
});

it("reuses observables with the same id", () => {
const reference0 = observable("will be override", { id: "text" });
const reference1 = observable("will be override", { id: "text" });

expect(reference0, "to be", reference1);
});

describe("with a non-existing session", () => {
it("throws an error", () => {
expect(
Expand Down Expand Up @@ -131,13 +124,6 @@ describe("restoreSession", () => {
expect(text, "to satisfy", "Hello session");
});

it("reuses observables with the same id", () => {
const reference0 = observable("will be override", { id: "text" });
const reference1 = observable("will be override", { id: "text" });

expect(reference0, "to be", reference1);
});

it("removes the stored session", () => {
expect(sessionStorage.getItem("@dependable/session"), "to be undefined");
});
Expand Down Expand Up @@ -263,13 +249,6 @@ describe("restoreSnapshot", () => {

expect(text, "to satisfy", "Hello session");
});

it("reuses observables with the same id", () => {
const reference0 = observable("will be override", { id: "text" });
const reference1 = observable("will be override", { id: "text" });

expect(reference0, "to be", reference1);
});
});

describe("diffSnapshots and applySnapshotDiff", () => {
Expand Down

0 comments on commit f8c4641

Please sign in to comment.