Type errors in test suite
parent
99689feffb
commit
aa366b7ea1
|
@ -37,9 +37,14 @@ describe("saveRegimen()", () => {
|
|||
saveRegimen(state.resources.index.all[0])(dispatch, getState);
|
||||
expect(dispatch).toHaveBeenCalledWith({
|
||||
payload: {
|
||||
body: { color: "red", name: "Foo", regimen_items: [] },
|
||||
body: {
|
||||
color: "red",
|
||||
name: "Foo",
|
||||
regimen_items: []
|
||||
},
|
||||
kind: "Regimen",
|
||||
uuid: state.resources.index.all[0]
|
||||
specialStatus: SpecialStatus.SAVED,
|
||||
uuid: "Regimen.0.19"
|
||||
},
|
||||
type: Actions.SAVE_RESOURCE_START
|
||||
});
|
||||
|
@ -66,9 +71,14 @@ describe("deleteRegimen()", () => {
|
|||
deleteRegimen(state.resources.index.all[0])(dispatch, getState);
|
||||
expect(dispatch).toHaveBeenCalledWith({
|
||||
payload: {
|
||||
body: { color: "red", name: "Foo", regimen_items: [] },
|
||||
body: {
|
||||
color: "red",
|
||||
name: "Foo",
|
||||
regimen_items: []
|
||||
},
|
||||
kind: "Regimen",
|
||||
uuid: state.resources.index.all[0]
|
||||
specialStatus: "",
|
||||
uuid: "Regimen.0.23"
|
||||
},
|
||||
type: Actions.DESTROY_RESOURCE_OK
|
||||
});
|
||||
|
|
|
@ -14,6 +14,7 @@ describe("resource reducer", () => {
|
|||
expect(sequence.kind).toBe("Sequence");
|
||||
const next = resourceReducer(state, overwrite(sequence, {
|
||||
name: "wow",
|
||||
args: { locals: { kind: "scope_declaration", args: {} } },
|
||||
body: []
|
||||
}));
|
||||
const seq2 = next.index.references[uuid] as TaggedSequence;
|
||||
|
|
|
@ -276,7 +276,7 @@ function addToIndex<T>(index: ResourceIndex,
|
|||
body: T,
|
||||
uuid: string) {
|
||||
const tr: TaggedResource =
|
||||
{ kind, body, uuid, status: SpecialStatus.SAVED } as any;
|
||||
{ kind, body, uuid, specialStatus: SpecialStatus.SAVED } as any;
|
||||
sanityCheck(tr);
|
||||
index.all.push(tr.uuid);
|
||||
index.byKind[tr.kind].push(tr.uuid);
|
||||
|
|
|
@ -144,7 +144,7 @@ describe("recomputeLocals", () => {
|
|||
|
||||
it("Doesn't crash on variable-less sequences", () => {
|
||||
const result = recomputeLocalVarDeclaration(sequence7);
|
||||
expect(result.args.locals.kind).toBe("nothing");
|
||||
expect(result.args.locals.kind).toBe("scope_declaration");
|
||||
expect((result.args.locals.body || []).length).toBe(0);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue