Skip to content

Commit 0750b53

Browse files
committed
test: Base.defaults(options)
1 parent 8fa62f0 commit 0750b53

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@ describe("Base", () => {
2727
expect(fooBarTest.foo()).toEqual("foo");
2828
expect(fooBarTest.bar()).toEqual("bar");
2929
});
30+
it(".defaults({foo: 'bar'})", () => {
31+
const BaseWithDefaults = Base.defaults({ foo: "bar" });
32+
const defaultsTest = new BaseWithDefaults();
33+
const mergedOptionsTest = new BaseWithDefaults({ baz: "daz" });
34+
expect(defaultsTest.options).toStrictEqual({ foo: "bar" });
35+
expect(mergedOptionsTest.options).toStrictEqual({ foo: "bar", baz: "daz" });
36+
});
3037
});

0 commit comments

Comments
 (0)