Skip to content

Commit ff92db0

Browse files
test(Wrapper): add check toStringTag and update unwrap().
1 parent 6c7a001 commit ff92db0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/wrapper.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ testing.describe(`Wrapper`, () => {
5555
})
5656
.it(`Wrapper.unwrap()`, () => {
5757
expect(Wrapper.unwrap(`${opening}${text}${closing}`, opening, closing)).toEqual(text);
58-
expect(Wrapper.unwrap(`${opening}${text}${closing}`, undefined, closing)).toEqual(`${opening}${text}${''}`);
59-
expect(Wrapper.unwrap(`${opening}${text}${closing}`, opening, undefined)).toEqual(`${''}${text}${closing}`);
58+
expect(Wrapper.unwrap(`${opening}${text}${closing}`, undefined as any, closing)).toEqual(`${opening}${text}${''}`);
59+
expect(Wrapper.unwrap(`${opening}${text}${closing}`, opening, undefined as any)).toEqual(`${''}${text}${closing}`);
6060
})
6161

6262
;
@@ -66,6 +66,7 @@ testing.describe(`Wrapper`, () => {
6666
testing
6767
.it(`[Symbol.toStringTag]`, () => {
6868
expect(typeOf(wrapper)).toEqual('wrapper');
69+
expect(Object.prototype.toString.call(wrapper)).toEqual('[object Wrapper]');
6970
});
7071
})
7172

0 commit comments

Comments
 (0)