SHARE
TWEET

Untitled

a guest Apr 19th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. λ npm t
  2.  
  3. > marshal.ts@0.0.1 test D:\marshal.ts
  4. > jest --coverage
  5.  
  6.  FAIL  packages/mongo/tests/class-to.spec.ts
  7.   ● Test suite failed to run
  8.  
  9.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  10.     packages/mongo/tests/class-to.spec.ts:4:27 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
  11.  
  12.     4 import {SimpleModel} from "@marcj/marshal/tests/entities";
  13.                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14.  
  15.  FAIL  packages/core/tests/class-to.spec.ts
  16.   ● Test suite failed to run
  17.  
  18.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  19.     packages/core/tests/class-to.spec.ts:29:18 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
  20.  
  21.     29     expect(plain.name).toBe('Hi');
  22.                         ~~~~
  23.     packages/core/tests/class-to.spec.ts:30:18 - error TS2339: Property 'children' does not exist on type 'Partial<{}>'.
  24.  
  25.     30     expect(plain.children[0].label).toBe('Foo');
  26.                         ~~~~~~~~
  27.  
  28.  FAIL  packages/mongo/tests/to-plain.spec.ts
  29.   ● Test suite failed to run
  30.  
  31.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  32.     packages/mongo/tests/to-plain.spec.ts:3:24 - error TS2307: Cannot find module 'mongodb'.
  33.  
  34.     3 import {ObjectID} from "mongodb";
  35.                              ~~~~~~~~~
  36.     packages/mongo/tests/to-plain.spec.ts:4:55 - error TS2307: Cannot find module '@marcj/marshal'.
  37.  
  38.     4 import {Field, IDField, MongoIdField, UUIDField} from "@marcj/marshal";
  39.                                                             ~~~~~~~~~~~~~~~~
  40.  
  41.  FAIL  packages/mongo/tests/typeorm.spec.ts
  42.   ● Test suite failed to run
  43.  
  44.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  45.     packages/mongo/tests/typeorm.spec.ts:3:32 - error TS2307: Cannot find module 'typeorm'.
  46.  
  47.     3 import {createConnection} from "typeorm";
  48.                                      ~~~~~~~~~
  49.     packages/mongo/tests/typeorm.spec.ts:4:46 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
  50.  
  51.     4 import {Plan, SimpleModel, SuperSimple} from "@marcj/marshal/tests/entities";
  52.                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  53.     packages/mongo/tests/typeorm.spec.ts:6:25 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageClass'.
  54.  
  55.     6 import {PageClass} from "@marcj/marshal/tests/document-scenario/PageClass";
  56.                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57.  
  58.  FAIL  packages/core/tests/plain-to.spec.ts
  59.   ● Test suite failed to run
  60.  
  61.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  62.     packages/core/tests/plain-to.spec.ts:123:21 - error TS2339: Property 'id' does not exist on type '{}'.
  63.  
  64.     123     expect(instance.id).toBe('21313');
  65.                             ~~
  66.     packages/core/tests/plain-to.spec.ts:124:21 - error TS2339: Property 'name' does not exist on type '{}'.
  67.  
  68.     124     expect(instance.name).toBe('Hi');
  69.                             ~~~~
  70.     packages/core/tests/plain-to.spec.ts:139:21 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
  71.  
  72.     139     expect(instance.name).toBe('Hi');
  73.                             ~~~~
  74.     packages/core/tests/plain-to.spec.ts:140:21 - error TS2339: Property 'children' does not exist on type 'Partial<{}>'.
  75.  
  76.     140     expect(instance.children[0]).toBeInstanceOf(SubModel);
  77.                             ~~~~~~~~
  78.     packages/core/tests/plain-to.spec.ts:141:21 - error TS2339: Property 'children' does not exist on type 'Partial<{}>'.
  79.  
  80.     141     expect(instance.children[0].label).toBe('Foo');
  81.                             ~~~~~~~~
  82.     packages/core/tests/plain-to.spec.ts:154:21 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
  83.  
  84.     154     expect(instance.name).toBe('Hi');
  85.                             ~~~~
  86.     packages/core/tests/plain-to.spec.ts:260:54 - error TS2339: Property 'enum' does not exist on type '{}'.
  87.  
  88.     260     expect(plainToClass(Model, {enum: MyEnum.first}).enum).toBe(MyEnum.first);
  89.                                                              ~~~~
  90.     packages/core/tests/plain-to.spec.ts:261:55 - error TS2339: Property 'enum' does not exist on type '{}'.
  91.  
  92.     261     expect(plainToClass(Model, {enum: MyEnum.second}).enum).toBe(MyEnum.second);
  93.                                                               ~~~~
  94.     packages/core/tests/plain-to.spec.ts:262:43 - error TS2339: Property 'enum' does not exist on type '{}'.
  95.  
  96.     262     expect(plainToClass(Model, {enum: 0}).enum).toBe(MyEnum.first);
  97.                                                   ~~~~
  98.     packages/core/tests/plain-to.spec.ts:263:43 - error TS2339: Property 'enum' does not exist on type '{}'.
  99.  
  100.     263     expect(plainToClass(Model, {enum: 1}).enum).toBe(MyEnum.second);
  101.                                                   ~~~~
  102.     packages/core/tests/plain-to.spec.ts:264:43 - error TS2339: Property 'enum' does not exist on type '{}'.
  103.  
  104.     264     expect(plainToClass(Model, {enum: 2}).enum).toBe(MyEnum.third);
  105.                                                   ~~~~
  106.     packages/core/tests/plain-to.spec.ts:267:53 - error TS2339: Property 'enum' does not exist on type '{}'.
  107.  
  108.     267         expect(plainToClass(Model, {enum: 'first'}).enum).toBe(MyEnum.first);
  109.                                                             ~~~~
  110.     packages/core/tests/plain-to.spec.ts:276:64 - error TS2339: Property 'enum' does not exist on type '{}'.
  111.  
  112.     276     expect(plainToClass(ModelWithLabels, {enum: MyEnum.first}).enum).toBe(MyEnum.first);
  113.                                                                        ~~~~
  114.     packages/core/tests/plain-to.spec.ts:277:65 - error TS2339: Property 'enum' does not exist on type '{}'.
  115.  
  116.     277     expect(plainToClass(ModelWithLabels, {enum: MyEnum.second}).enum).toBe(MyEnum.second);
  117.                                                                         ~~~~
  118.     packages/core/tests/plain-to.spec.ts:278:53 - error TS2339: Property 'enum' does not exist on type '{}'.
  119.  
  120.     278     expect(plainToClass(ModelWithLabels, {enum: 0}).enum).toBe(MyEnum.first);
  121.                                                             ~~~~
  122.     packages/core/tests/plain-to.spec.ts:279:53 - error TS2339: Property 'enum' does not exist on type '{}'.
  123.  
  124.     279     expect(plainToClass(ModelWithLabels, {enum: 1}).enum).toBe(MyEnum.second);
  125.                                                             ~~~~
  126.     packages/core/tests/plain-to.spec.ts:280:53 - error TS2339: Property 'enum' does not exist on type '{}'.
  127.  
  128.     280     expect(plainToClass(ModelWithLabels, {enum: 2}).enum).toBe(MyEnum.third);
  129.                                                             ~~~~
  130.     packages/core/tests/plain-to.spec.ts:282:59 - error TS2339: Property 'enum' does not exist on type '{}'.
  131.  
  132.     282     expect(plainToClass(ModelWithLabels, {enum: 'first'}).enum).toBe(MyEnum.first);
  133.                                                                   ~~~~
  134.     packages/core/tests/plain-to.spec.ts:283:60 - error TS2339: Property 'enum' does not exist on type '{}'.
  135.  
  136.     283     expect(plainToClass(ModelWithLabels, {enum: 'second'}).enum).toBe(MyEnum.second);
  137.                                                                    ~~~~
  138.     packages/core/tests/plain-to.spec.ts:284:59 - error TS2339: Property 'enum' does not exist on type '{}'.
  139.  
  140.     284     expect(plainToClass(ModelWithLabels, {enum: 'third'}).enum).toBe(MyEnum.third);
  141.                                                                   ~~~~
  142.     packages/core/tests/plain-to.spec.ts:287:60 - error TS2339: Property 'enum' does not exist on type '{}'.
  143.  
  144.     287         expect(plainToClass(ModelWithLabels, {enum: 'Hi'}).enum).toBe(MyEnum.first);
  145.                                                                    ~~~~
  146.     packages/core/tests/plain-to.spec.ts:319:18 - error TS2339: Property 'name' does not exist on type '{}'.
  147.  
  148.     319         expect(u.name).toBe('peter');
  149.                          ~~~~
  150.     packages/core/tests/plain-to.spec.ts:320:18 - error TS2339: Property 'tags' does not exist on type '{}'.
  151.  
  152.     320         expect(u.tags).toEqual([]);
  153.                          ~~~~
  154.     packages/core/tests/plain-to.spec.ts:321:18 - error TS2339: Property 'parent' does not exist on type '{}'.
  155.  
  156.     321         expect(u.parent).toBeUndefined();
  157.                          ~~~~~~
  158.     packages/core/tests/plain-to.spec.ts:344:18 - error TS2339: Property 'name' does not exist on type 'Partial<{}>'.
  159.  
  160.     344         expect(m.name).toBe(undefined);
  161.                          ~~~~
  162.     packages/core/tests/plain-to.spec.ts:345:18 - error TS2339: Property 'tags' does not exist on type 'Partial<{}>'.
  163.  
  164.     345         expect(m.tags).toBeArray()
  165.                          ~~~~
  166.  
  167.  FAIL  packages/mongo/tests/mongo.spec.ts
  168.   ● Test suite failed to run
  169.  
  170.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  171.     packages/mongo/tests/mongo.spec.ts:12:8 - error TS2307: Cannot find module '@marcj/marshal'.
  172.  
  173.     12 } from "@marcj/marshal";
  174.               ~~~~~~~~~~~~~~~~
  175.     packages/mongo/tests/mongo.spec.ts:13:32 - error TS2307: Cannot find module 'mongodb'.
  176.  
  177.     13 import {Binary, ObjectID} from "mongodb";
  178.                                       ~~~~~~~~~
  179.     packages/mongo/tests/mongo.spec.ts:15:40 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
  180.  
  181.     15 import {SimpleModel, SuperSimple} from "@marcj/marshal/tests/entities";
  182.                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  183.     packages/mongo/tests/mongo.spec.ts:17:22 - error TS2307: Cannot find module 'buffer'.
  184.  
  185.     17 import {Buffer} from "buffer";
  186.                             ~~~~~~~~
  187.     packages/mongo/tests/mongo.spec.ts:18:32 - error TS2307: Cannot find module 'typeorm'.
  188.  
  189.     18 import {createConnection} from "typeorm";
  190.                                       ~~~~~~~~~
  191.     packages/mongo/tests/mongo.spec.ts:72:19 - error TS2339: Property 'name' does not exist on type '{}'.
  192.  
  193.     72     expect(found!.name).toBe('myName');
  194.                          ~~~~
  195.     packages/mongo/tests/mongo.spec.ts:73:19 - error TS2339: Property 'id' does not exist on type '{}'.
  196.  
  197.     73     expect(found!.id).toBe(instance.id);
  198.                          ~~
  199.     packages/mongo/tests/mongo.spec.ts:77:20 - error TS2339: Property 'name' does not exist on type '{}'.
  200.  
  201.     77     expect(list[0].name).toBe('myName');
  202.                           ~~~~
  203.     packages/mongo/tests/mongo.spec.ts:78:20 - error TS2339: Property 'id' does not exist on type '{}'.
  204.  
  205.     78     expect(list[0].id).toBe(instance.id);
  206.                           ~~
  207.     packages/mongo/tests/mongo.spec.ts:82:23 - error TS2339: Property 'name' does not exist on type '{}'.
  208.  
  209.     82     expect(listAll[0].name).toBe('myName');
  210.                              ~~~~
  211.     packages/mongo/tests/mongo.spec.ts:83:23 - error TS2339: Property 'id' does not exist on type '{}'.
  212.  
  213.     83     expect(listAll[0].id).toBe(instance.id);
  214.                              ~~
  215.     packages/mongo/tests/mongo.spec.ts:95:23 - error TS2339: Property 'name' does not exist on type '{}'.
  216.  
  217.     95         expect(found!.name).toBe('myName2');
  218.                              ~~~~
  219.     packages/mongo/tests/mongo.spec.ts:182:25 - error TS2339: Property '_id' does not exist on type '{}'.
  220.  
  221.     182         expect(items[0]._id).toBe(instance._id);
  222.                                 ~~~
  223.     packages/mongo/tests/mongo.spec.ts:183:25 - error TS2339: Property 'name' does not exist on type '{}'.
  224.  
  225.     183         expect(items[0].name).toBe(instance.name);
  226.                                 ~~~~
  227.     packages/mongo/tests/mongo.spec.ts:224:21 - error TS2339: Property '_id' does not exist on type '{}'.
  228.  
  229.     224     expect(items[0]._id).toBe(instance._id);
  230.                             ~~~
  231.     packages/mongo/tests/mongo.spec.ts:225:21 - error TS2339: Property 'name' does not exist on type '{}'.
  232.  
  233.     225     expect(items[0].name).toBe(instance.name);
  234.                             ~~~~
  235.     packages/mongo/tests/mongo.spec.ts:249:20 - error TS2339: Property 'name' does not exist on type '{}'.
  236.  
  237.     249     expect(dbItem!.name).toBe('myName');
  238.                            ~~~~
  239.     packages/mongo/tests/mongo.spec.ts:251:13 - error TS2339: Property 'name' does not exist on type '{}'.
  240.  
  241.     251     dbItem!.name = 'Changed';
  242.                     ~~~~
  243.     packages/mongo/tests/mongo.spec.ts:304:20 - error TS2339: Property 'name' does not exist on type '{}'.
  244.  
  245.     304     expect(dbItem!.name).toBe('myName');
  246.                            ~~~~
  247.     packages/mongo/tests/mongo.spec.ts:307:30 - error TS2339: Property 'name' does not exist on type '{}'.
  248.  
  249.     307     expect(dbItemBySecondId!.name).toBe('myName');
  250.                                      ~~~~
  251.  
  252.  FAIL  packages/mongo/tests/to-class.spec.ts
  253.   ● Test suite failed to run
  254.  
  255.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  256.     packages/mongo/tests/to-class.spec.ts:19:8 - error TS2307: Cannot find module '@marcj/marshal'.
  257.  
  258.     19 } from "@marcj/marshal";
  259.               ~~~~~~~~~~~~~~~~
  260.     packages/mongo/tests/to-class.spec.ts:27:8 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
  261.  
  262.     27 } from "@marcj/marshal/tests/entities";
  263.               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  264.     packages/mongo/tests/to-class.spec.ts:28:22 - error TS2307: Cannot find module 'mongodb'.
  265.  
  266.     28 import {Binary} from "mongodb";
  267.                             ~~~~~~~~~
  268.     packages/mongo/tests/to-class.spec.ts:29:81 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/DocumentClass'.
  269.  
  270.     29 import {ClassWithUnmetParent, DocumentClass, ImpossibleToMetDocumentClass} from "@marcj/marshal/tests/document-scenario/DocumentClass";
  271.                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  272.     packages/mongo/tests/to-class.spec.ts:30:30 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageCollection'.
  273.  
  274.     30 import {PageCollection} from "@marcj/marshal/tests/document-scenario/PageCollection";
  275.                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  276.     packages/mongo/tests/to-class.spec.ts:31:25 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageClass'.
  277.  
  278.     31 import {PageClass} from "@marcj/marshal/tests/document-scenario/PageClass";
  279.                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  280.     packages/mongo/tests/to-class.spec.ts:33:81 - error TS2307: Cannot find module '@marcj/estdlib'.
  281.  
  282.     33 import {getEnumLabels, getEnumValues, isValidEnumValue, getValidEnumValue} from '@marcj/estdlib';
  283.                                                                                        ~~~~~~~~~~~~~~~~
  284.     packages/mongo/tests/to-class.spec.ts:489:25 - error TS2339: Property 'document' does not exist on type '{}'.
  285.  
  286.     489         expect(instance.document).toBe(doc);
  287.                                 ~~~~~~~~
  288.  
  289.  FAIL  packages/mongo/tests/to-mongo.spec.ts
  290.   ● Test suite failed to run
  291.  
  292.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  293.     packages/mongo/tests/to-mongo.spec.ts:11:8 - error TS2307: Cannot find module '@marcj/marshal'.
  294.  
  295.     11 } from "@marcj/marshal";
  296.               ~~~~~~~~~~~~~~~~
  297.     packages/mongo/tests/to-mongo.spec.ts:12:43 - error TS2307: Cannot find module '@marcj/marshal/tests/entities'.
  298.  
  299.     12 import {Plan, SimpleModel, SubModel} from "@marcj/marshal/tests/entities";
  300.                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  301.     packages/mongo/tests/to-mongo.spec.ts:13:32 - error TS2307: Cannot find module 'mongodb'.
  302.  
  303.     13 import {Binary, ObjectID} from "mongodb";
  304.                                       ~~~~~~~~~
  305.     packages/mongo/tests/to-mongo.spec.ts:21:22 - error TS2307: Cannot find module 'buffer'.
  306.  
  307.     21 import {Buffer} from "buffer";
  308.                             ~~~~~~~~
  309.     packages/mongo/tests/to-mongo.spec.ts:22:29 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/DocumentClass'.
  310.  
  311.     22 import {DocumentClass} from "@marcj/marshal/tests/document-scenario/DocumentClass";
  312.                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  313.     packages/mongo/tests/to-mongo.spec.ts:23:30 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageCollection'.
  314.  
  315.     23 import {PageCollection} from "@marcj/marshal/tests/document-scenario/PageCollection";
  316.                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  317.     packages/mongo/tests/to-mongo.spec.ts:24:25 - error TS2307: Cannot find module '@marcj/marshal/tests/document-scenario/PageClass'.
  318.  
  319.     24 import {PageClass} from "@marcj/marshal/tests/document-scenario/PageClass";
  320.                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  321.     packages/mongo/tests/to-mongo.spec.ts:127:14 - error TS2339: Property 'preview' does not exist on type '{}'.
  322.  
  323.     127     expect(i.preview.length).toBe(6);
  324.                      ~~~~~~~
  325.     packages/mongo/tests/to-mongo.spec.ts:128:14 - error TS2339: Property 'preview' does not exist on type '{}'.
  326.  
  327.     128     expect(i.preview.toString('utf8')).toBe('FooBar');
  328.                      ~~~~~~~
  329.     packages/mongo/tests/to-mongo.spec.ts:381:18 - error TS2339: Property 'name' does not exist on type '{}'.
  330.  
  331.     381         expect(u.name).toBe('peter');
  332.                          ~~~~
  333.     packages/mongo/tests/to-mongo.spec.ts:382:18 - error TS2339: Property 'picture' does not exist on type '{}'.
  334.  
  335.     382         expect(u.picture).toBe(null);
  336.                          ~~~~~~~
  337.     packages/mongo/tests/to-mongo.spec.ts:383:18 - error TS2339: Property 'tags' does not exist on type '{}'.
  338.  
  339.     383         expect(u.tags).toEqual([]);
  340.                          ~~~~
  341.     packages/mongo/tests/to-mongo.spec.ts:384:18 - error TS2339: Property 'parent' does not exist on type '{}'.
  342.  
  343.     384         expect(u.parent).toBeUndefined();
  344.                          ~~~~~~
  345.  
  346.  FAIL  packages/core/tests/validation.spec.ts
  347.   ● Test suite failed to run
  348.  
  349.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  350.     packages/core/tests/validation.spec.ts:17:27 - error TS2307: Cannot find module '@marcj/estdlib'.
  351.  
  352.     17 import {CustomError} from '@marcj/estdlib';
  353.                                  ~~~~~~~~~~~~~~~~
  354.     packages/core/tests/validation.spec.ts:230:45 - error TS2339: Property 'bo' does not exist on type '{}'.
  355.  
  356.     230     expect(plainToClass(Model, {bo: false}).bo).toBe(false);
  357.                                                     ~~
  358.     packages/core/tests/validation.spec.ts:231:44 - error TS2339: Property 'bo' does not exist on type '{}'.
  359.  
  360.     231     expect(plainToClass(Model, {bo: true}).bo).toBe(true);
  361.                                                    ~~
  362.     packages/core/tests/validation.spec.ts:232:47 - error TS2339: Property 'bo' does not exist on type '{}'.
  363.  
  364.     232     expect(plainToClass(Model, {bo: 'false'}).bo).toBe(false);
  365.                                                       ~~
  366.     packages/core/tests/validation.spec.ts:233:46 - error TS2339: Property 'bo' does not exist on type '{}'.
  367.  
  368.     233     expect(plainToClass(Model, {bo: 'true'}).bo).toBe(true);
  369.                                                      ~~
  370.     packages/core/tests/validation.spec.ts:234:43 - error TS2339: Property 'bo' does not exist on type '{}'.
  371.  
  372.     234     expect(plainToClass(Model, {bo: '1'}).bo).toBe(true);
  373.                                                   ~~
  374.     packages/core/tests/validation.spec.ts:235:43 - error TS2339: Property 'bo' does not exist on type '{}'.
  375.  
  376.     235     expect(plainToClass(Model, {bo: '0'}).bo).toBe(false);
  377.                                                   ~~
  378.     packages/core/tests/validation.spec.ts:236:41 - error TS2339: Property 'bo' does not exist on type '{}'.
  379.  
  380.     236     expect(plainToClass(Model, {bo: 1}).bo).toBe(true);
  381.                                                 ~~
  382.     packages/core/tests/validation.spec.ts:237:41 - error TS2339: Property 'bo' does not exist on type '{}'.
  383.  
  384.     237     expect(plainToClass(Model, {bo: 0}).bo).toBe(false);
  385.                                                 ~~
  386.     packages/core/tests/validation.spec.ts:277:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
  387.  
  388.     277         expect(o.endTime).toEqual(date);
  389.                          ~~~~~~~
  390.     packages/core/tests/validation.spec.ts:282:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
  391.  
  392.     282         expect(o.endTime).toEqual(date);
  393.                          ~~~~~~~
  394.     packages/core/tests/validation.spec.ts:287:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
  395.  
  396.     287         expect(o.endTime).toBe(null);
  397.                          ~~~~~~~
  398.     packages/core/tests/validation.spec.ts:292:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
  399.  
  400.     292         expect(o.endTime).toBe(undefined);
  401.                          ~~~~~~~
  402.     packages/core/tests/validation.spec.ts:297:18 - error TS2339: Property 'endTime' does not exist on type '{}'.
  403.  
  404.     297         expect(o.endTime).toEqual(date);
  405.                          ~~~~~~~
  406.  
  407.  FAIL  packages/nest/tests/validation.spec.ts
  408.   ● Test suite failed to run
  409.  
  410.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  411.     packages/nest/tests/validation.spec.ts:3:41 - error TS2307: Cannot find module '@marcj/marshal'.
  412.  
  413.     3 import {Optional, validate, Field} from "@marcj/marshal";
  414.                                               ~~~~~~~~~~~~~~~~
  415.     packages/nest/tests/validation.spec.ts:5:35 - error TS2307: Cannot find module '@nestjs/common'.
  416.  
  417.     5 import {BadRequestException} from '@nestjs/common';
  418.                                         ~~~~~~~~~~~~~~~~
  419.  
  420.  FAIL  packages/core/tests/to-plain.spec.ts
  421.   ● Test suite failed to run
  422.  
  423.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  424.     packages/core/src/decorators.ts:12:93 - error TS2307: Cannot find module '@marcj/estdlib'.
  425.  
  426.     12 import {ClassType, getClassName, isArray, isNumber, isObject, isPlainObject, isString} from '@marcj/estdlib';
  427.                                                                                                    ~~~~~~~~~~~~~~~~
  428.     packages/core/src/decorators.ts:13:22 - error TS2307: Cannot find module 'buffer'.
  429.  
  430.     13 import {Buffer} from "buffer";
  431.                             ~~~~~~~~
  432.     packages/core/src/decorators.ts:916:48 - error TS2532: Object is possibly 'undefined'.
  433.  
  434.     916             schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
  435.                                                        ~~~~~~
  436.     packages/core/src/decorators.ts:916:55 - error TS2339: Property 'join' does not exist on type 'string | string[]'.
  437.       Property 'join' does not exist on type 'string'.
  438.  
  439.     916             schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
  440.                                                               ~~~~
  441.     packages/core/src/decorators.ts:918:34 - error TS2322: Type 'string | string[] | undefined' is not assignable to type 'string | undefined'.
  442.       Type 'string[]' is not assignable to type 'string'.
  443.  
  444.     918             schema.indices.push({name: name || fields, fields: [fields] as string[], options: options || {}});
  445.                                          ~~~~
  446.  
  447.       packages/core/src/decorators.ts:124:32
  448.         124 export interface EntityIndex { name?: string, fields: string[], options: IndexOptions }
  449.                                            ~~~~
  450.         The expected type comes from property 'name' which is declared here on type 'EntityIndex'
  451.  
  452.  FAIL  packages/core/tests/speed.spec.ts
  453.   ● Test suite failed to run
  454.  
  455.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  456.     packages/core/src/mapper.ts:4:22 - error TS2307: Cannot find module 'buffer'.
  457.  
  458.     4 import {Buffer} from 'buffer';
  459.                            ~~~~~~~~
  460.     packages/core/src/mapper.ts:19:8 - error TS2307: Cannot find module '@marcj/estdlib'.
  461.  
  462.     19 } from "@marcj/estdlib";
  463.               ~~~~~~~~~~~~~~~~
  464.     packages/core/src/mapper.ts:626:5 - error TS2322: Type '{}' is not assignable to type 'T'.
  465.  
  466.     626     return item;
  467.             ~~~~~~~~~~~~
  468.  
  469.  FAIL  packages/core/tests/decorator.spec.ts
  470.   ● Test suite failed to run
  471.  
  472.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  473.     packages/core/tests/decorator.spec.ts:21:22 - error TS2307: Cannot find module 'buffer'.
  474.  
  475.     21 import {Buffer} from "buffer";
  476.                             ~~~~~~~~
  477.     packages/core/tests/decorator.spec.ts:482:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  478.  
  479.     482         expect(instance.bool).toBeFalse();
  480.                                 ~~~~
  481.     packages/core/tests/decorator.spec.ts:483:25 - error TS2339: Property 'whatever' does not exist on type '{}'.
  482.  
  483.     483         expect(instance.whatever).toEqual({any: false});
  484.                                 ~~~~~~~~
  485.     packages/core/tests/decorator.spec.ts:490:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  486.  
  487.     490         expect(instance.bool).toBeTrue();
  488.                                 ~~~~
  489.     packages/core/tests/decorator.spec.ts:497:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  490.  
  491.     497         expect(instance.bool).toBeTrue();
  492.                                 ~~~~
  493.     packages/core/tests/decorator.spec.ts:504:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  494.  
  495.     504         expect(instance.bool).toBeTrue();
  496.                                 ~~~~
  497.     packages/core/tests/decorator.spec.ts:511:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  498.  
  499.     511         expect(instance.bool).toBeFalse();
  500.                                 ~~~~
  501.     packages/core/tests/decorator.spec.ts:518:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  502.  
  503.     518         expect(instance.bool).toBeFalse();
  504.                                 ~~~~
  505.     packages/core/tests/decorator.spec.ts:525:25 - error TS2339: Property 'bool' does not exist on type '{}'.
  506.  
  507.     525         expect(instance.bool).toBeFalse();
  508.                                 ~~~~
  509.     packages/core/tests/decorator.spec.ts:564:17 - error TS2339: Property 'preview' does not exist on type '{}'.
  510.  
  511.     564     expect(back.preview).toBeInstanceOf(Buffer);
  512.                         ~~~~~~~
  513.     packages/core/tests/decorator.spec.ts:565:17 - error TS2339: Property 'preview' does not exist on type '{}'.
  514.  
  515.     565     expect(back.preview.toString('utf8')).toBe('FooBar');
  516.                         ~~~~~~~
  517.     packages/core/tests/decorator.spec.ts:566:17 - error TS2339: Property 'preview' does not exist on type '{}'.
  518.  
  519.     566     expect(back.preview.length).toBe(6);
  520.                         ~~~~~~~
  521.  
  522.  FAIL  packages/mongo/tests/mongo-query.spec.ts
  523.   ● Test suite failed to run
  524.  
  525.     TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  526.     packages/mongo/tests/mongo-query.spec.ts:3:32 - error TS2307: Cannot find module '@marcj/marshal/src/decorators'.
  527.  
  528.     3 import {Field, Decorated} from "@marcj/marshal/src/decorators";
  529.                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  530.  
  531. Running coverage on untested files...Failed to collect coverage from D:\marshal.ts\packages\mongo\src\typeorm.ts
  532. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  533. packages/mongo/src/typeorm.ts:11:8 - error TS2307: Cannot find module '@marcj/marshal'.
  534.  
  535. 11 } from "@marcj/marshal";
  536.           ~~~~~~~~~~~~~~~~
  537. packages/mongo/src/typeorm.ts:12:93 - error TS2307: Cannot find module 'typeorm'.
  538.  
  539. 12 import {ColumnType, EntitySchema, EntitySchemaColumnOptions, EntitySchemaIndexOptions} from "typeorm";
  540.                                                                                                ~~~~~~~~~
  541. packages/mongo/src/typeorm.ts:13:40 - error TS2307: Cannot find module '@marcj/estdlib'.
  542.  
  543. 13 import {ClassType, getEnumValues} from "@marcj/estdlib";
  544.                                           ~~~~~~~~~~~~~~~~
  545. STACK:
  546. Failed to collect coverage from D:\marshal.ts\packages\mongo\src\database.ts
  547. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  548. packages/mongo/src/database.ts:1:96 - error TS2307: Cannot find module '@marcj/marshal'.
  549.  
  550. 1 import {getCollectionName, getDatabaseName, getEntityName, getIdField, getReflectionType} from '@marcj/marshal';
  551.                                                                                                  ~~~~~~~~~~~~~~~~
  552. packages/mongo/src/database.ts:11:46 - error TS2307: Cannot find module 'typeorm'.
  553.  
  554. 11 import {Collection, Connection, Cursor} from 'typeorm';
  555.                                                 ~~~~~~~~~
  556. packages/mongo/src/database.ts:12:39 - error TS2307: Cannot find module '@marcj/estdlib'.
  557.  
  558. 12 import {ClassType, getClassName} from '@marcj/estdlib';
  559.                                          ~~~~~~~~~~~~~~~~
  560. STACK:
  561. Failed to collect coverage from D:\marshal.ts\packages\mongo\src\mapping.ts
  562. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  563. packages/mongo/src/mapping.ts:1:32 - error TS2307: Cannot find module 'mongodb'.
  564.  
  565. 1 import {Binary, ObjectID} from "mongodb";
  566.                                  ~~~~~~~~~
  567. packages/mongo/src/mapping.ts:15:8 - error TS2307: Cannot find module '@marcj/marshal'.
  568.  
  569. 15 } from "@marcj/marshal";
  570.           ~~~~~~~~~~~~~~~~
  571. packages/mongo/src/mapping.ts:28:8 - error TS2307: Cannot find module '@marcj/estdlib'.
  572.  
  573. 28 } from "@marcj/estdlib";
  574.           ~~~~~~~~~~~~~~~~
  575. 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.
  576.  
  577. 246             return new Binary(Buffer.from(value, 'base64'));
  578.                                   ~~~~~~
  579. STACK:
  580. Failed to collect coverage from D:\marshal.ts\packages\nest\src\nest.ts
  581. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  582. packages/nest/src/nest.ts:1:68 - error TS2307: Cannot find module '@nestjs/common'.
  583.  
  584. 1 import {PipeTransform, ArgumentMetadata, BadRequestException} from '@nestjs/common';
  585.                                                                      ~~~~~~~~~~~~~~~~
  586. packages/nest/src/nest.ts:2:58 - error TS2307: Cannot find module '@marcj/marshal'.
  587.  
  588. 2 import {validate, plainToClass, applyDefaultValues} from "@marcj/marshal";
  589.                                                            ~~~~~~~~~~~~~~~~
  590. STACK:
  591. Failed to collect coverage from D:\marshal.ts\packages\core\src\validation.ts
  592. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  593. packages/core/src/validation.ts:1:61 - error TS2307: Cannot find module '@marcj/estdlib'.
  594.  
  595. 1 import {ClassType, isArray, isObject, typeOf, eachKey} from "@marcj/estdlib";
  596.                                                               ~~~~~~~~~~~~~~~~
  597. STACK:
  598. Failed to collect coverage from D:\marshal.ts\packages\core\src\decorators.ts
  599. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  600. packages/core/src/decorators.ts:12:93 - error TS2307: Cannot find module '@marcj/estdlib'.
  601.  
  602. 12 import {ClassType, getClassName, isArray, isNumber, isObject, isPlainObject, isString} from '@marcj/estdlib';
  603.                                                                                                ~~~~~~~~~~~~~~~~
  604. packages/core/src/decorators.ts:13:22 - error TS2307: Cannot find module 'buffer'.
  605.  
  606. 13 import {Buffer} from "buffer";
  607.                         ~~~~~~~~
  608. packages/core/src/decorators.ts:916:48 - error TS2532: Object is possibly 'undefined'.
  609.  
  610. 916             schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
  611.                                                    ~~~~~~
  612. packages/core/src/decorators.ts:916:55 - error TS2339: Property 'join' does not exist on type 'string | string[]'.
  613.   Property 'join' does not exist on type 'string'.
  614.  
  615. 916             schema.indices.push({name: name || fields.join('_'), fields: fields as string[], options: options || {}});
  616.                                                           ~~~~
  617. packages/core/src/decorators.ts:918:34 - error TS2322: Type 'string | string[] | undefined' is not assignable to type 'string | undefined'.
  618.   Type 'string[]' is not assignable to type 'string'.
  619.  
  620. 918             schema.indices.push({name: name || fields, fields: [fields] as string[], options: options || {}});
  621.                                      ~~~~
  622.  
  623.   packages/core/src/decorators.ts:124:32
  624.     124 export interface EntityIndex { name?: string, fields: string[], options: IndexOptions }
  625.                                        ~~~~
  626.     The expected type comes from property 'name' which is declared here on type 'EntityIndex'
  627. STACK:
  628. Failed to collect coverage from D:\marshal.ts\packages\core\src\mapper.ts
  629. ERROR: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
  630. packages/core/src/mapper.ts:4:22 - error TS2307: Cannot find module 'buffer'.
  631.  
  632. 4 import {Buffer} from 'buffer';
  633.                        ~~~~~~~~
  634. packages/core/src/mapper.ts:19:8 - error TS2307: Cannot find module '@marcj/estdlib'.
  635.  
  636. 19 } from "@marcj/estdlib";
  637.           ~~~~~~~~~~~~~~~~
  638. packages/core/src/mapper.ts:626:5 - error TS2322: Type '{}' is not assignable to type 'T'.
  639.  
  640. 626     return item;
  641.         ~~~~~~~~~~~~
  642. STACK:
  643. --------------|----------|----------|----------|----------|-------------------|
  644. File          |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
  645. --------------|----------|----------|----------|----------|-------------------|
  646. All files     |        0 |      100 |        0 |        0 |                   |
  647.  core         |        0 |      100 |      100 |        0 |                   |
  648.   global.d.ts |        0 |        0 |        0 |        0 |                   |
  649.   index.ts    |        0 |      100 |      100 |        0 |         1,3,4,5,6 |
  650.  core/src     |        0 |      100 |        0 |        0 |                   |
  651.   utils.ts    |        0 |      100 |        0 |        0 |             1,3,4 |
  652.  mongo        |        0 |      100 |      100 |        0 |                   |
  653.   index.ts    |        0 |      100 |      100 |        0 |             1,2,3 |
  654.  nest         |        0 |      100 |      100 |        0 |                   |
  655.   index.ts    |        0 |      100 |      100 |        0 |                 1 |
  656. --------------|----------|----------|----------|----------|-------------------|
  657. Test Suites: 14 failed, 14 total
  658. Tests:       0 total
  659. Snapshots:   0 total
  660. Time:        8.951s
  661. Ran all test suites.
  662. npm ERR! Test failed.  See above for more details.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top