Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- λ npm t
- > marshal.ts@0.0.1 test D:\marshal.ts
- > jest --coverage
- FAIL packages/mongo/tests/class-to.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/class-to.spec.ts:4:27 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
- 4 import {SimpleModel} from "@marcj/marshal/tests/entities";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- FAIL packages/core/tests/class-to.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/tests/class-to.spec.ts:29:18 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
- 29 expect(plain.name).toBe('Hi');
- ~~~~
- packages/core/tests/class-to.spec.ts:30:18 - error TS2339: Property 'children' does not exist on type 'Partial<{}>'.
- 30 expect(plain.children[0].label).toBe('Foo');
- ~~~~~~~~
- FAIL packages/mongo/tests/to-plain.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/to-plain.spec.ts:3:24 - error TS2307: Cannot find module 'mongodb'.
- 3 import {ObjectID} from "mongodb";
- ~~~~~~~~~
- packages/mongo/tests/to-plain.spec.ts:4:55 - error TS2307: Cannot find module '@marcj/marshal'.
- 4 import {Field, IDField, MongoIdField, UUIDField} from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- FAIL packages/mongo/tests/typeorm.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/typeorm.spec.ts:3:32 - error TS2307: Cannot find module 'typeorm'.
- 3 import {createConnection} from "typeorm";
- ~~~~~~~~~
- packages/mongo/tests/typeorm.spec.ts:4:46 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
- 4 import {Plan, SimpleModel, SuperSimple} from "@marcj/marshal/tests/entities";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/typeorm.spec.ts:6:25 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageClass'.
- 6 import {PageClass} from "@marcj/marshal/tests/document-scenario/PageClass";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- FAIL packages/core/tests/plain-to.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/tests/plain-to.spec.ts:123:21 - error TS2339: Property 'id' does not exist on type '{}'.
- 123 expect(instance.id).toBe('21313');
- ~~
- packages/core/tests/plain-to.spec.ts:124:21 - error TS2339: Property 'name' does not exist on type '{}'.
- 124 expect(instance.name).toBe('Hi');
- ~~~~
- packages/core/tests/plain-to.spec.ts:139:21 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
- 139 expect(instance.name).toBe('Hi');
- ~~~~
- packages/core/tests/plain-to.spec.ts:140:21 - error TS2339: Property 'children' does not exist on type 'Partial<{}>'.
- 140 expect(instance.children[0]).toBeInstanceOf(SubModel);
- ~~~~~~~~
- packages/core/tests/plain-to.spec.ts:141:21 - error TS2339: Property 'children' does not exist on type 'Partial<{}>'.
- 141 expect(instance.children[0].label).toBe('Foo');
- ~~~~~~~~
- packages/core/tests/plain-to.spec.ts:154:21 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
- 154 expect(instance.name).toBe('Hi');
- ~~~~
- packages/core/tests/plain-to.spec.ts:260:54 - error TS2339: Property 'enum' does not exist on type '{}'.
- 260 expect(plainToClass(Model, {enum: MyEnum.first}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:261:55 - error TS2339: Property 'enum' does not exist on type '{}'.
- 261 expect(plainToClass(Model, {enum: MyEnum.second}).enum).toBe(MyEnum.second);
- ~~~~
- packages/core/tests/plain-to.spec.ts:262:43 - error TS2339: Property 'enum' does not exist on type '{}'.
- 262 expect(plainToClass(Model, {enum: 0}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:263:43 - error TS2339: Property 'enum' does not exist on type '{}'.
- 263 expect(plainToClass(Model, {enum: 1}).enum).toBe(MyEnum.second);
- ~~~~
- packages/core/tests/plain-to.spec.ts:264:43 - error TS2339: Property 'enum' does not exist on type '{}'.
- 264 expect(plainToClass(Model, {enum: 2}).enum).toBe(MyEnum.third);
- ~~~~
- packages/core/tests/plain-to.spec.ts:267:53 - error TS2339: Property 'enum' does not exist on type '{}'.
- 267 expect(plainToClass(Model, {enum: 'first'}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:276:64 - error TS2339: Property 'enum' does not exist on type '{}'.
- 276 expect(plainToClass(ModelWithLabels, {enum: MyEnum.first}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:277:65 - error TS2339: Property 'enum' does not exist on type '{}'.
- 277 expect(plainToClass(ModelWithLabels, {enum: MyEnum.second}).enum).toBe(MyEnum.second);
- ~~~~
- packages/core/tests/plain-to.spec.ts:278:53 - error TS2339: Property 'enum' does not exist on type '{}'.
- 278 expect(plainToClass(ModelWithLabels, {enum: 0}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:279:53 - error TS2339: Property 'enum' does not exist on type '{}'.
- 279 expect(plainToClass(ModelWithLabels, {enum: 1}).enum).toBe(MyEnum.second);
- ~~~~
- packages/core/tests/plain-to.spec.ts:280:53 - error TS2339: Property 'enum' does not exist on type '{}'.
- 280 expect(plainToClass(ModelWithLabels, {enum: 2}).enum).toBe(MyEnum.third);
- ~~~~
- packages/core/tests/plain-to.spec.ts:282:59 - error TS2339: Property 'enum' does not exist on type '{}'.
- 282 expect(plainToClass(ModelWithLabels, {enum: 'first'}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:283:60 - error TS2339: Property 'enum' does not exist on type '{}'.
- 283 expect(plainToClass(ModelWithLabels, {enum: 'second'}).enum).toBe(MyEnum.second);
- ~~~~
- packages/core/tests/plain-to.spec.ts:284:59 - error TS2339: Property 'enum' does not exist on type '{}'.
- 284 expect(plainToClass(ModelWithLabels, {enum: 'third'}).enum).toBe(MyEnum.third);
- ~~~~
- packages/core/tests/plain-to.spec.ts:287:60 - error TS2339: Property 'enum' does not exist on type '{}'.
- 287 expect(plainToClass(ModelWithLabels, {enum: 'Hi'}).enum).toBe(MyEnum.first);
- ~~~~
- packages/core/tests/plain-to.spec.ts:319:18 - error TS2339: Property 'name' does not exist on type '{}'.
- 319 expect(u.name).toBe('peter');
- ~~~~
- packages/core/tests/plain-to.spec.ts:320:18 - error TS2339: Property 'tags' does not exist on type '{}'.
- 320 expect(u.tags).toEqual([]);
- ~~~~
- packages/core/tests/plain-to.spec.ts:321:18 - error TS2339: Property 'parent' does not exist on type '{}'.
- 321 expect(u.parent).toBeUndefined();
- ~~~~~~
- packages/core/tests/plain-to.spec.ts:344:18 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
- 344 expect(m.name).toBe(undefined);
- ~~~~
- packages/core/tests/plain-to.spec.ts:345:18 - error TS2339: Property 'tags' does not exist on type 'Partial<{}>'.
- 345 expect(m.tags).toBeArray()
- ~~~~
- FAIL packages/mongo/tests/mongo.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/mongo.spec.ts:12:8 - error TS2307: Cannot find module '@marcj/marshal'.
- 12 } from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- packages/mongo/tests/mongo.spec.ts:13:32 - error TS2307: Cannot find module 'mongodb'.
- 13 import {Binary, ObjectID} from "mongodb";
- ~~~~~~~~~
- packages/mongo/tests/mongo.spec.ts:15:40 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
- 15 import {SimpleModel, SuperSimple} from "@marcj/marshal/tests/entities";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/mongo.spec.ts:17:22 - error TS2307: Cannot find module 'buffer'.
- 17 import {Buffer} from "buffer";
- ~~~~~~~~
- packages/mongo/tests/mongo.spec.ts:18:32 - error TS2307: Cannot find module 'typeorm'.
- 18 import {createConnection} from "typeorm";
- ~~~~~~~~~
- packages/mongo/tests/mongo.spec.ts:72:19 - error TS2339: Property 'name' does not exist on type '{}'.
- 72 expect(found!.name).toBe('myName');
- ~~~~
- packages/mongo/tests/mongo.spec.ts:73:19 - error TS2339: Property 'id' does not exist on type '{}'.
- 73 expect(found!.id).toBe(instance.id);
- ~~
- packages/mongo/tests/mongo.spec.ts:77:20 - error TS2339: Property 'name' does not exist on type '{}'.
- 77 expect(list[0].name).toBe('myName');
- ~~~~
- packages/mongo/tests/mongo.spec.ts:78:20 - error TS2339: Property 'id' does not exist on type '{}'.
- 78 expect(list[0].id).toBe(instance.id);
- ~~
- packages/mongo/tests/mongo.spec.ts:82:23 - error TS2339: Property 'name' does not exist on type '{}'.
- 82 expect(listAll[0].name).toBe('myName');
- ~~~~
- packages/mongo/tests/mongo.spec.ts:83:23 - error TS2339: Property 'id' does not exist on type '{}'.
- 83 expect(listAll[0].id).toBe(instance.id);
- ~~
- packages/mongo/tests/mongo.spec.ts:95:23 - error TS2339: Property 'name' does not exist on type '{}'.
- 95 expect(found!.name).toBe('myName2');
- ~~~~
- packages/mongo/tests/mongo.spec.ts:182:25 - error TS2339: Property '_id' does not exist on type '{}'.
- 182 expect(items[0]._id).toBe(instance._id);
- ~~~
- packages/mongo/tests/mongo.spec.ts:183:25 - error TS2339: Property 'name' does not exist on type '{}'.
- 183 expect(items[0].name).toBe(instance.name);
- ~~~~
- packages/mongo/tests/mongo.spec.ts:224:21 - error TS2339: Property '_id' does not exist on type '{}'.
- 224 expect(items[0]._id).toBe(instance._id);
- ~~~
- packages/mongo/tests/mongo.spec.ts:225:21 - error TS2339: Property 'name' does not exist on type '{}'.
- 225 expect(items[0].name).toBe(instance.name);
- ~~~~
- packages/mongo/tests/mongo.spec.ts:249:20 - error TS2339: Property 'name' does not exist on type '{}'.
- 249 expect(dbItem!.name).toBe('myName');
- ~~~~
- packages/mongo/tests/mongo.spec.ts:251:13 - error TS2339: Property 'name' does not exist on type '{}'.
- 251 dbItem!.name = 'Changed';
- ~~~~
- packages/mongo/tests/mongo.spec.ts:304:20 - error TS2339: Property 'name' does not exist on type '{}'.
- 304 expect(dbItem!.name).toBe('myName');
- ~~~~
- packages/mongo/tests/mongo.spec.ts:307:30 - error TS2339: Property 'name' does not exist on type '{}'.
- 307 expect(dbItemBySecondId!.name).toBe('myName');
- ~~~~
- FAIL packages/mongo/tests/to-class.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/to-class.spec.ts:19:8 - error TS2307: Cannot find module '@marcj/marshal'.
- 19 } from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:27:8 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
- 27 } from "@marcj/marshal/tests/entities";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:28:22 - error TS2307: Cannot find module 'mongodb'.
- 28 import {Binary} from "mongodb";
- ~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:29:81 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/DocumentClass'.
- 29 import {ClassWithUnmetParent, DocumentClass, ImpossibleToMetDocumentClass} from "@marcj/marshal/tests/document-scenario/DocumentClass";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:30:30 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageCollection'.
- 30 import {PageCollection} from "@marcj/marshal/tests/document-scenario/PageCollection";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:31:25 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageClass'.
- 31 import {PageClass} from "@marcj/marshal/tests/document-scenario/PageClass";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:33:81 - error TS2307: Cannot find module '@marcj/estdlib'.
- 33 import {getEnumLabels, getEnumValues, isValidEnumValue, getValidEnumValue} from '@marcj/estdlib';
- ~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-class.spec.ts:489:25 - error TS2339: Property 'document' does not exist on type '{}'.
- 489 expect(instance.document).toBe(doc);
- ~~~~~~~~
- FAIL packages/mongo/tests/to-mongo.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/to-mongo.spec.ts:11:8 - error TS2307: Cannot find module '@marcj/marshal'.
- 11 } from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:12:43 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
- 12 import {Plan, SimpleModel, SubModel} from "@marcj/marshal/tests/entities";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:13:32 - error TS2307: Cannot find module 'mongodb'.
- 13 import {Binary, ObjectID} from "mongodb";
- ~~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:21:22 - error TS2307: Cannot find module 'buffer'.
- 21 import {Buffer} from "buffer";
- ~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:22:29 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/DocumentClass'.
- 22 import {DocumentClass} from "@marcj/marshal/tests/document-scenario/DocumentClass";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:23:30 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageCollection'.
- 23 import {PageCollection} from "@marcj/marshal/tests/document-scenario/PageCollection";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:24:25 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageClass'.
- 24 import {PageClass} from "@marcj/marshal/tests/document-scenario/PageClass";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:127:14 - error TS2339: Property 'preview' does not exist on type '{}'.
- 127 expect(i.preview.length).toBe(6);
- ~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:128:14 - error TS2339: Property 'preview' does not exist on type '{}'.
- 128 expect(i.preview.toString('utf8')).toBe('FooBar');
- ~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:381:18 - error TS2339: Property 'name' does not exist on type '{}'.
- 381 expect(u.name).toBe('peter');
- ~~~~
- packages/mongo/tests/to-mongo.spec.ts:382:18 - error TS2339: Property 'picture' does not exist on type '{}'.
- 382 expect(u.picture).toBe(null);
- ~~~~~~~
- packages/mongo/tests/to-mongo.spec.ts:383:18 - error TS2339: Property 'tags' does not exist on type '{}'.
- 383 expect(u.tags).toEqual([]);
- ~~~~
- packages/mongo/tests/to-mongo.spec.ts:384:18 - error TS2339: Property 'parent' does not exist on type '{}'.
- 384 expect(u.parent).toBeUndefined();
- ~~~~~~
- FAIL packages/core/tests/validation.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/tests/validation.spec.ts:17:27 - error TS2307: Cannot find module '@marcj/estdlib'.
- 17 import {CustomError} from '@marcj/estdlib';
- ~~~~~~~~~~~~~~~~
- packages/core/tests/validation.spec.ts:230:45 - error TS2339: Property 'bo' does not exist on type '{}'.
- 230 expect(plainToClass(Model, {bo: false}).bo).toBe(false);
- ~~
- packages/core/tests/validation.spec.ts:231:44 - error TS2339: Property 'bo' does not exist on type '{}'.
- 231 expect(plainToClass(Model, {bo: true}).bo).toBe(true);
- ~~
- packages/core/tests/validation.spec.ts:232:47 - error TS2339: Property 'bo' does not exist on type '{}'.
- 232 expect(plainToClass(Model, {bo: 'false'}).bo).toBe(false);
- ~~
- packages/core/tests/validation.spec.ts:233:46 - error TS2339: Property 'bo' does not exist on type '{}'.
- 233 expect(plainToClass(Model, {bo: 'true'}).bo).toBe(true);
- ~~
- packages/core/tests/validation.spec.ts:234:43 - error TS2339: Property 'bo' does not exist on type '{}'.
- 234 expect(plainToClass(Model, {bo: '1'}).bo).toBe(true);
- ~~
- packages/core/tests/validation.spec.ts:235:43 - error TS2339: Property 'bo' does not exist on type '{}'.
- 235 expect(plainToClass(Model, {bo: '0'}).bo).toBe(false);
- ~~
- packages/core/tests/validation.spec.ts:236:41 - error TS2339: Property 'bo' does not exist on type '{}'.
- 236 expect(plainToClass(Model, {bo: 1}).bo).toBe(true);
- ~~
- packages/core/tests/validation.spec.ts:237:41 - error TS2339: Property 'bo' does not exist on type '{}'.
- 237 expect(plainToClass(Model, {bo: 0}).bo).toBe(false);
- ~~
- packages/core/tests/validation.spec.ts:277:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
- 277 expect(o.endTime).toEqual(date);
- ~~~~~~~
- packages/core/tests/validation.spec.ts:282:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
- 282 expect(o.endTime).toEqual(date);
- ~~~~~~~
- packages/core/tests/validation.spec.ts:287:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
- 287 expect(o.endTime).toBe(null);
- ~~~~~~~
- packages/core/tests/validation.spec.ts:292:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
- 292 expect(o.endTime).toBe(undefined);
- ~~~~~~~
- packages/core/tests/validation.spec.ts:297:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
- 297 expect(o.endTime).toEqual(date);
- ~~~~~~~
- FAIL packages/nest/tests/validation.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/nest/tests/validation.spec.ts:3:41 - error TS2307: Cannot find module '@marcj/marshal'.
- 3 import {Optional, validate, Field} from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- packages/nest/tests/validation.spec.ts:5:35 - error TS2307: Cannot find module '@nestjs/common'.
- 5 import {BadRequestException} from '@nestjs/common';
- ~~~~~~~~~~~~~~~~
- FAIL packages/core/tests/to-plain.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/src/decorators.ts:12:93 - error TS2307: Cannot find module '@marcj/estdlib'.
- 12 import {ClassType, getClassName, isArray, isNumber, isObject, isPlainObject, isString} from '@marcj/estdlib';
- ~~~~~~~~~~~~~~~~
- packages/core/src/decorators.ts:13:22 - error TS2307: Cannot find module 'buffer'.
- 13 import {Buffer} from "buffer";
- ~~~~~~~~
- packages/core/src/decorators.ts:916:48 - error TS2532: Object is possibly 'undefined'.
- 916 schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
- ~~~~~~
- packages/core/src/decorators.ts:916:55 - error TS2339: Property 'join' does not exist on type 'string | string[]'.
- Property 'join' does not exist on type 'string'.
- 916 schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
- ~~~~
- packages/core/src/decorators.ts:918:34 - error TS2322: Type 'string | string[] | undefined' is not assignable to type 'string | undefined'.
- Type 'string[]' is not assignable to type 'string'.
- 918 schema.indices.push({name: name || fields, fields: [fields] as string[], options: options || {}});
- ~~~~
- packages/core/src/decorators.ts:124:32
- 124 export interface EntityIndex { name?: string, fields: string[], options: IndexOptions }
- ~~~~
- The expected type comes from property 'name' which is declared here on type 'EntityIndex'
- FAIL packages/core/tests/speed.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/src/mapper.ts:4:22 - error TS2307: Cannot find module 'buffer'.
- 4 import {Buffer} from 'buffer';
- ~~~~~~~~
- packages/core/src/mapper.ts:19:8 - error TS2307: Cannot find module '@marcj/estdlib'.
- 19 } from "@marcj/estdlib";
- ~~~~~~~~~~~~~~~~
- packages/core/src/mapper.ts:626:5 - error TS2322: Type '{}' is not assignable to type 'T'.
- 626 return item;
- ~~~~~~~~~~~~
- FAIL packages/core/tests/decorator.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/tests/decorator.spec.ts:21:22 - error TS2307: Cannot find module 'buffer'.
- 21 import {Buffer} from "buffer";
- ~~~~~~~~
- packages/core/tests/decorator.spec.ts:482:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 482 expect(instance.bool).toBeFalse();
- ~~~~
- packages/core/tests/decorator.spec.ts:483:25 - error TS2339: Property 'whatever' does not exist on type '{}'.
- 483 expect(instance.whatever).toEqual({any: false});
- ~~~~~~~~
- packages/core/tests/decorator.spec.ts:490:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 490 expect(instance.bool).toBeTrue();
- ~~~~
- packages/core/tests/decorator.spec.ts:497:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 497 expect(instance.bool).toBeTrue();
- ~~~~
- packages/core/tests/decorator.spec.ts:504:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 504 expect(instance.bool).toBeTrue();
- ~~~~
- packages/core/tests/decorator.spec.ts:511:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 511 expect(instance.bool).toBeFalse();
- ~~~~
- packages/core/tests/decorator.spec.ts:518:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 518 expect(instance.bool).toBeFalse();
- ~~~~
- packages/core/tests/decorator.spec.ts:525:25 - error TS2339: Property 'bool' does not exist on type '{}'.
- 525 expect(instance.bool).toBeFalse();
- ~~~~
- packages/core/tests/decorator.spec.ts:564:17 - error TS2339: Property 'preview' does not exist on type '{}'.
- 564 expect(back.preview).toBeInstanceOf(Buffer);
- ~~~~~~~
- packages/core/tests/decorator.spec.ts:565:17 - error TS2339: Property 'preview' does not exist on type '{}'.
- 565 expect(back.preview.toString('utf8')).toBe('FooBar');
- ~~~~~~~
- packages/core/tests/decorator.spec.ts:566:17 - error TS2339: Property 'preview' does not exist on type '{}'.
- 566 expect(back.preview.length).toBe(6);
- ~~~~~~~
- FAIL packages/mongo/tests/mongo-query.spec.ts
- ● Test suite failed to run
- TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/tests/mongo-query.spec.ts:3:32 - error TS2307: Cannot find module '@marcj/marshal/src/decorators'.
- 3 import {Field, Decorated} from "@marcj/marshal/src/decorators";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Running coverage on untested files...Failed to collect coverage from D:\marshal.ts\packages\mongo\src\typeorm.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/src/typeorm.ts:11:8 - error TS2307: Cannot find module '@marcj/marshal'.
- 11 } from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- packages/mongo/src/typeorm.ts:12:93 - error TS2307: Cannot find module 'typeorm'.
- 12 import {ColumnType, EntitySchema, EntitySchemaColumnOptions, EntitySchemaIndexOptions} from "typeorm";
- ~~~~~~~~~
- packages/mongo/src/typeorm.ts:13:40 - error TS2307: Cannot find module '@marcj/estdlib'.
- 13 import {ClassType, getEnumValues} from "@marcj/estdlib";
- ~~~~~~~~~~~~~~~~
- STACK:
- Failed to collect coverage from D:\marshal.ts\packages\mongo\src\database.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/src/database.ts:1:96 - error TS2307: Cannot find module '@marcj/marshal'.
- 1 import {getCollectionName, getDatabaseName, getEntityName, getIdField, getReflectionType} from '@marcj/marshal';
- ~~~~~~~~~~~~~~~~
- packages/mongo/src/database.ts:11:46 - error TS2307: Cannot find module 'typeorm'.
- 11 import {Collection, Connection, Cursor} from 'typeorm';
- ~~~~~~~~~
- packages/mongo/src/database.ts:12:39 - error TS2307: Cannot find module '@marcj/estdlib'.
- 12 import {ClassType, getClassName} from '@marcj/estdlib';
- ~~~~~~~~~~~~~~~~
- STACK:
- Failed to collect coverage from D:\marshal.ts\packages\mongo\src\mapping.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/mongo/src/mapping.ts:1:32 - error TS2307: Cannot find module 'mongodb'.
- 1 import {Binary, ObjectID} from "mongodb";
- ~~~~~~~~~
- packages/mongo/src/mapping.ts:15:8 - error TS2307: Cannot find module '@marcj/marshal'.
- 15 } from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- packages/mongo/src/mapping.ts:28:8 - error TS2307: Cannot find module '@marcj/estdlib'.
- 28 } from "@marcj/estdlib";
- ~~~~~~~~~~~~~~~~
- packages/mongo/src/mapping.ts:246:31 - error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
- 246 return new Binary(Buffer.from(value, 'base64'));
- ~~~~~~
- STACK:
- Failed to collect coverage from D:\marshal.ts\packages\nest\src\nest.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/nest/src/nest.ts:1:68 - error TS2307: Cannot find module '@nestjs/common'.
- 1 import {PipeTransform, ArgumentMetadata, BadRequestException} from '@nestjs/common';
- ~~~~~~~~~~~~~~~~
- packages/nest/src/nest.ts:2:58 - error TS2307: Cannot find module '@marcj/marshal'.
- 2 import {validate, plainToClass, applyDefaultValues} from "@marcj/marshal";
- ~~~~~~~~~~~~~~~~
- STACK:
- Failed to collect coverage from D:\marshal.ts\packages\core\src\validation.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/src/validation.ts:1:61 - error TS2307: Cannot find module '@marcj/estdlib'.
- 1 import {ClassType, isArray, isObject, typeOf, eachKey} from "@marcj/estdlib";
- ~~~~~~~~~~~~~~~~
- STACK:
- Failed to collect coverage from D:\marshal.ts\packages\core\src\decorators.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/src/decorators.ts:12:93 - error TS2307: Cannot find module '@marcj/estdlib'.
- 12 import {ClassType, getClassName, isArray, isNumber, isObject, isPlainObject, isString} from '@marcj/estdlib';
- ~~~~~~~~~~~~~~~~
- packages/core/src/decorators.ts:13:22 - error TS2307: Cannot find module 'buffer'.
- 13 import {Buffer} from "buffer";
- ~~~~~~~~
- packages/core/src/decorators.ts:916:48 - error TS2532: Object is possibly 'undefined'.
- 916 schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
- ~~~~~~
- packages/core/src/decorators.ts:916:55 - error TS2339: Property 'join' does not exist on type 'string | string[]'.
- Property 'join' does not exist on type 'string'.
- 916 schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
- ~~~~
- packages/core/src/decorators.ts:918:34 - error TS2322: Type 'string | string[] | undefined' is not assignable to type 'string | undefined'.
- Type 'string[]' is not assignable to type 'string'.
- 918 schema.indices.push({name: name || fields, fields: [fields] as string[], options: options || {}});
- ~~~~
- packages/core/src/decorators.ts:124:32
- 124 export interface EntityIndex { name?: string, fields: string[], options: IndexOptions }
- ~~~~
- The expected type comes from property 'name' which is declared here on type 'EntityIndex'
- STACK:
- Failed to collect coverage from D:\marshal.ts\packages\core\src\mapper.ts
- ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
- packages/core/src/mapper.ts:4:22 - error TS2307: Cannot find module 'buffer'.
- 4 import {Buffer} from 'buffer';
- ~~~~~~~~
- packages/core/src/mapper.ts:19:8 - error TS2307: Cannot find module '@marcj/estdlib'.
- 19 } from "@marcj/estdlib";
- ~~~~~~~~~~~~~~~~
- packages/core/src/mapper.ts:626:5 - error TS2322: Type '{}' is not assignable to type 'T'.
- 626 return item;
- ~~~~~~~~~~~~
- STACK:
- --------------|----------|----------|----------|----------|-------------------|
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
- --------------|----------|----------|----------|----------|-------------------|
- All files | 0 | 100 | 0 | 0 | |
- core | 0 | 100 | 100 | 0 | |
- global.d.ts | 0 | 0 | 0 | 0 | |
- index.ts | 0 | 100 | 100 | 0 | 1,3,4,5,6 |
- core/src | 0 | 100 | 0 | 0 | |
- utils.ts | 0 | 100 | 0 | 0 | 1,3,4 |
- mongo | 0 | 100 | 100 | 0 | |
- index.ts | 0 | 100 | 100 | 0 | 1,2,3 |
- nest | 0 | 100 | 100 | 0 | |
- index.ts | 0 | 100 | 100 | 0 | 1 |
- --------------|----------|----------|----------|----------|-------------------|
- Test Suites: 14 failed, 14 total
- Tests: 0 total
- Snapshots: 0 total
- Time: 8.951s
- Ran all test suites.
- npm ERR! Test failed. See above for more details.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement