fix(test): make sure chai does not compare prototypes
This commit is contained in:
parent
ea13031518
commit
db8dc22288
|
@ -8,5 +8,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type AllowedBufferEncoding = 'ascii' | 'utf-8';
|
||||
export type AllowedBufferEncoding = 'ascii' | 'utf-8';
|
||||
```
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ChildSpawner = typeof spawn;
|
||||
export type ChildSpawner = typeof spawn;
|
||||
```
|
||||
|
|
|
@ -9,7 +9,7 @@ A `Map` or dictionary object with string keys and `TVal` values.
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type MapLike<TVal> = Map<string, TVal> | Dict<TVal>;
|
||||
export type MapLike<TVal> = Map<string, TVal> | Dict<TVal>;
|
||||
```
|
||||
<b>References:</b> [Dict](./js-utils.dict.md)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Value that may be nil.
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type Maybe<T> = T | None;
|
||||
export type Maybe<T> = T | None;
|
||||
```
|
||||
<b>References:</b> [None](./js-utils.none.md)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Old name for None.
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type Nil = None;
|
||||
export type Nil = None;
|
||||
```
|
||||
<b>References:</b> [None](./js-utils.none.md)
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@ Unset value.
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type None = null | undefined;
|
||||
export type None = null | undefined;
|
||||
```
|
||||
|
|
|
@ -14,7 +14,7 @@ Old name for Maybe.
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type Optional<T> = Maybe<T>;
|
||||
export type Optional<T> = Maybe<T>;
|
||||
```
|
||||
<b>References:</b> [Maybe](./js-utils.maybe.md)
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ describe('map utils', async () => {
|
|||
|
||||
over('maps of strings', dictionary(string(), string()), (it) => {
|
||||
it('should convert map to dict', async (data) => {
|
||||
delete data.__proto__; // hack for chai, https://github.com/chaijs/chai/issues/518
|
||||
|
||||
const map = new Map(Object.entries(data));
|
||||
expect(makeDict(map)).to.deep.equal(data);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue