Skip to content

Instantly share code, notes, and snippets.

@grundyoso
Created December 10, 2019 10:15
Show Gist options
  • Save grundyoso/5c4bf0bd68a751d628af588a3e24bc86 to your computer and use it in GitHub Desktop.
Save grundyoso/5c4bf0bd68a751d628af588a3e24bc86 to your computer and use it in GitHub Desktop.
passninja-passkit
MLLA6702:passninja-passkit rgrundy$ npm run test
> passninja-passkit@1.0.0 test /Users/rgrundy/Documents/personal/workspace/passninja-passkit
> jest
PASS src/utils/W3CDateString.spec.ts (13.619s)
PASS src/utils/typeGuards.spec.ts (13.846s)
PASS src/PassStructure.spec.ts (14.239s)
PASS src/PassJson.spec.ts (14.267s)
PASS src/Field.spec.ts (14.274s)
FAIL src/Image.spec.ts (20.106s)
● Image › should have a static method Image.create that returns a promise
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should have a static method Image.create that returns a promise
TypeError: Cannot read property 'objectUrl' of undefined
21 |
22 | it("should have a static method Image.create that returns a promise", () => {
> 23 | expect(Image.create(testImage.objectUrl) instanceof Promise).toEqual(
| ^
24 | true
25 | );
26 | });
at Object.it (src/Image.spec.ts:23:39)
● Image › promise returned from Image.create() should resolve to a new Image()
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should handle the file name of the image › should allow correct file names as the name parameter
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should handle the file name of the image › shouldn't allow names that are not allowed in passes as the name parameter
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should handle the file name of the image › should try to determine the name of the file if no name is supplied to the constructor
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should handle the file name of the image › should try to determine the name of the file if no name is supplied to the constructor
TypeError: Cannot read property 'objectUrl' of undefined
69 |
70 | it("should try to determine the name of the file if no name is supplied to the constructor", async () => {
> 71 | const image = await Image.create(testImage.objectUrl);
| ^
72 | expect(image.name).toEqual(testImage.name);
73 | });
74 |
at src/Image.spec.ts:71:56
at src/Image.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/Image.spec.ts:4:12)
at Object.it (src/Image.spec.ts:70:113)
● Image › should handle the file name of the image › shouldn't allow inline data if no name parameter is supplied
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should be able do download images from s3 in Buffer format
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should be able do download images from s3 in Buffer format
TypeError: Cannot read property 'Key' of undefined
83 | await Image.loadS3Data({
84 | Bucket: testBucket,
> 85 | Key: testImage.Key
| ^
86 | })
87 | )
88 | ).toEqual(true);
at src/Image.spec.ts:85:36
at src/Image.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/Image.spec.ts:4:12)
at Object.it (src/Image.spec.ts:80:81)
● Image › should be able do download imagaes from https urls in Buffer format
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should use aws-sdk (loadS3Data) for s3 urls
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should use aws-sdk (loadS3Data) for s3 urls
TypeError: Cannot read property 'objectUrl' of undefined
98 | const s3Spy = jest.spyOn(Image, "loadS3Data");
99 |
> 100 | await Image.create(testImage.objectUrl);
| ^
101 | expect(s3Spy).toHaveBeenCalledTimes(1);
102 |
103 | await Image.create(testImage.webUrl);
at src/Image.spec.ts:100:38
at src/Image.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/Image.spec.ts:4:12)
at Object.it (src/Image.spec.ts:97:66)
● Image › should use axios (loadHttpsData) to make non-s3-url requests
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should store download on .data properly as a Buffer
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should store download on .data properly as a Buffer
TypeError: Cannot read property 'objectUrl' of undefined
117 |
118 | it("should store download on .data properly as a Buffer", async () => {
> 119 | const image = await Image.create(testImage.objectUrl);
| ^
120 |
121 | expect(image.data).not.toBeUndefined();
122 |
at src/Image.spec.ts:119:52
at src/Image.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/Image.spec.ts:4:12)
at Object.it (src/Image.spec.ts:118:74)
● Image › should handle file hashing › should calculate hash of downloaded data
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should handle file hashing › should calculate hash of downloaded data
TypeError: Cannot read property 'objectUrl' of undefined
130 |
131 | it("should calculate hash of downloaded data", async () => {
> 132 | image = await Image.create(testImage.objectUrl);
| ^
133 | expect(image.hash).not.toBeUndefined();
134 | expect(typeof image.hash === "string").toEqual(true);
135 | });
at src/Image.spec.ts:132:50
at src/Image.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/Image.spec.ts:4:12)
at Object.it (src/Image.spec.ts:131:67)
● Image › should handle file hashing › should throw an error if attempting to get hash and no data exists
CredentialsError: Missing credentials in configError: connect EHOSTUNREACH 169.254.169.254:80 - Local (172.29.5.101:59652)
at net.js:1062:9
● Image › should handle file hashing › should throw an error if attempting to get hash and no data exists
TypeError: Cannot set property 'data' of undefined
136 |
137 | it("should throw an error if attempting to get hash and no data exists", () => {
> 138 | image.data = undefined as any;
| ^
139 | expect(() => image.hash).toThrow();
140 | });
141 | });
at Object.it (src/Image.spec.ts:138:23)
FAIL src/ApplePass.spec.ts (35.059s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: connect EHOSTDOWN 169.254.169.254:80 - Local (172.29.5.101:59654)
at internalConnect (net.js:964:16)
at defaultTriggerAsyncIdScope (internal/async_hooks.js:281:19)
at net.js:1062:9
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickDomainCallback (internal/process/next_tick.js:219:9)
● ApplePass › new ApplePass() › should accept a PassJson object as the passJson parameter
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › new ApplePass() › should accept a PassJson object as the passJson parameter
expect(received).not.toThrow()
Error name: "TypeError"
Error message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:42:24)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at Object.it (src/ApplePass.spec.ts:43:20)
41 | expect(() => {
42 | pass = new ApplePass({ passJson: new PassJson({}), certs });
> 43 | }).not.toThrow();
| ^
44 |
45 | expect(pass.passJson).toBeInstanceOf(PassJson);
46 | });
at Object.it (src/ApplePass.spec.ts:43:20)
● ApplePass › new ApplePass() › should accept an IPassJson object as the passJson parameter
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › new ApplePass() › should accept an IPassJson object as the passJson parameter
expect(received).not.toThrow()
Error name: "TypeError"
Error message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:53:24)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at Object.it (src/ApplePass.spec.ts:54:20)
52 | expect(() => {
53 | pass = new ApplePass({ passJson, certs });
> 54 | }).not.toThrow();
| ^
55 |
56 | expect(pass.passJson).toBeInstanceOf(PassJson);
57 | });
at Object.it (src/ApplePass.spec.ts:54:20)
● ApplePass › new ApplePass() › should thrown if no wwdrca, signing cert or key are found
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › new ApplePass() › should thrown if no wwdrca, signing cert or key are found
expect(received).toThrow(expected)
Expected substring: "must include a signing certificate"
Received message: "must include wwrd CA cert"
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
25 | if (!certs.wwdrca) {
> 26 | throw new Error("must include wwrd CA cert");
| ^
27 | }
28 |
29 | if (!certs.certificate) {
at new ApplePass (src/ApplePass.ts:26:19)
at expect (src/ApplePass.spec.ts:70:21)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at Object.it (src/ApplePass.spec.ts:74:15)
72 | certs: { ...certs, certificate: undefined as any }
73 | })
> 74 | ).toThrow("must include a signing certificate");
| ^
75 |
76 | expect(
77 | () =>
at Object.it (src/ApplePass.spec.ts:74:15)
● ApplePass › new ApplePass() › should not thrown if certs.encryptionPublicKey is not present
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › new ApplePass() › should not thrown if certs.encryptionPublicKey is not present
expect(received).not.toThrow()
Error name: "Error"
Error message: "must include wwrd CA cert"
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
25 | if (!certs.wwdrca) {
> 26 | throw new Error("must include wwrd CA cert");
| ^
27 | }
28 |
29 | if (!certs.certificate) {
at new ApplePass (src/ApplePass.ts:26:19)
at expect (src/ApplePass.spec.ts:88:21)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at Object.it (src/ApplePass.spec.ts:95:19)
93 | }
94 | })
> 95 | ).not.toThrow();
| ^
96 | });
97 | });
98 |
at Object.it (src/ApplePass.spec.ts:95:19)
● ApplePass › it should handle images from the images and manifest keys › pass.images should resolve to an empty [] if no image or manifest is provided
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › pass.images should resolve to an empty [] if no image or manifest is provided
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at Object.it (src/ApplePass.spec.ts:101:26)
● ApplePass › it should handle images from the images and manifest keys › images parameter › it should take a string[] of urls
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › images parameter › it should take a string[] of urls
expect(received).not.toThrow()
Error name: "TypeError"
Error message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:109:28)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at src/ApplePass.spec.ts:114:24
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:106:66)
112 | images: imagesStrings
113 | });
> 114 | }).not.toThrow();
| ^
115 |
116 | const imageArray = await Promise.all(pass.images);
117 | const IMAGES_HASHES = (await promisAllImages).map(
at src/ApplePass.spec.ts:114:24
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:106:66)
● ApplePass › it should handle images from the images and manifest keys › images parameter › images parameter should take a Promise<Image>[]
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › images parameter › images parameter should take a Promise<Image>[]
expect(received).not.toThrow()
Error name: "TypeError"
Error message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:131:28)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at src/ApplePass.spec.ts:136:24
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:128:80)
134 | images: imagePromiseArray
135 | });
> 136 | }).not.toThrow();
| ^
137 |
138 | const imageArray = await Promise.all(pass.images);
139 | const IMAGES_HASHES = (await promisAllImages).map(
at src/ApplePass.spec.ts:136:24
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:128:80)
● ApplePass › it should handle images from the images and manifest keys › images parameter › images parameter should take an Image[]
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › images parameter › images parameter should take an Image[]
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at src/ApplePass.spec.ts:154:28
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at expect (src/ApplePass.spec.ts:153:35)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at src/ApplePass.spec.ts:159:24
● ApplePass › it should handle images from the images and manifest keys › images parameter › images parameter should take an Image[]
TypeError: Cannot read property 'images' of undefined
159 | }).not.toThrow();
160 |
> 161 | const imageArray = await Promise.all(pass.images);
| ^
162 | const IMAGES_HASHES = (await promisAllImages).map(
163 | image => image.hash
164 | );
at src/ApplePass.spec.ts:161:59
at fulfilled (src/ApplePass.spec.ts:5:58)
● ApplePass › it should handle images from the images and manifest keys › images parameter › should throw if not Array<string | Image | Promise<Image>>
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › images parameter › should throw if not Array<string | Image | Promise<Image>>
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at Object.done (src/ApplePass.spec.ts:176:21)
● ApplePass › it should handle images from the images and manifest keys › images parameter › should throw if not Array<string | Image | Promise<Image>>
expect.assertions(1)
Expected one assertion to be called but received zero assertion calls.
172 |
173 | it("should throw if not Array<string | Image | Promise<Image>>", done => {
> 174 | expect.assertions(1);
| ^
175 | Promise.all(
176 | new ApplePass({
177 | passJson: { generic: {} },
at Object.done (src/ApplePass.spec.ts:174:24)
● ApplePass › it should handle images from the images and manifest keys › manifest parameter › should throw an error if manifest parsing fails
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › manifest parameter › should throw an error if manifest parsing fails
expect(received).toThrow(expected)
Expected substring: "couldn't parse manifest for new ApplePass(). must be valid JSON"
Received message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:193:21)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at Object.it (src/ApplePass.spec.ts:198:20)
196 | manifest: "}}".concat(JSON.stringify(testManifest))
197 | });
> 198 | }).toThrow(
| ^
199 | `couldn't parse manifest for new ApplePass(). must be valid JSON`
200 | );
201 | });
at Object.it (src/ApplePass.spec.ts:198:20)
● ApplePass › it should handle images from the images and manifest keys › manifest parameter › should parse the manifest and images to image array
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › manifest parameter › should parse the manifest and images to image array
expect(received).not.toThrow()
Error name: "TypeError"
Error message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:206:28)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at src/ApplePass.spec.ts:211:24
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:203:84)
209 | manifest: JSON.stringify(testManifest)
210 | });
> 211 | }).not.toThrow();
| ^
212 |
213 | const imageArray = await Promise.all(pass.images);
214 | const IMAGES_HASHES = (await Promise.all(manifestPromises)).map(
at src/ApplePass.spec.ts:211:24
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:203:84)
● ApplePass › it should handle images from the images and manifest keys › if both manifest and images are defined should put manifst images at end so they take presednce when zippping
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › it should handle images from the images and manifest keys › if both manifest and images are defined should put manifst images at end so they take presednce when zippping
expect(received).not.toThrow()
Error name: "TypeError"
Error message: "Cannot read property 'wwdrca' of undefined"
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at expect (src/ApplePass.spec.ts:230:24)
at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:81:11)
at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:342:33)
at src/ApplePass.spec.ts:236:20
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:226:138)
234 | manifest: testManifest
235 | });
> 236 | }).not.toThrow();
| ^
237 |
238 | const imageArray = await Promise.all(pass.images);
239 | const images = await Promise.all(
at src/ApplePass.spec.ts:236:20
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:226:138)
● ApplePass › should be able to update the passJson, images and manifest › updating passJson › should only accept a string or IPassJson for passJson key
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › should be able to update the passJson, images and manifest › updating passJson › should only accept a string or IPassJson for passJson key
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at Object.it (src/ApplePass.spec.ts:254:30)
● ApplePass › should be able to update the passJson, images and manifest › updating passJson › should accept a string for passJson key
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › should be able to update the passJson, images and manifest › updating passJson › should accept a string for passJson key
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at Object.it (src/ApplePass.spec.ts:274:30)
● ApplePass › should be able to update the passJson, images and manifest › updating passJson › should accept an IPassJson object for passJson key
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › should be able to update the passJson, images and manifest › updating passJson › should accept an IPassJson object for passJson key
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at Object.it (src/ApplePass.spec.ts:296:30)
● ApplePass › should bundle files correctly and create the manifest and signature
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › should bundle files correctly and create the manifest and signature
TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
at Function.all (<anonymous>)
188 | const _images: { [key: string]: Image } = {};
189 |
> 190 | const IMAGES = await Promise.all(images);
| ^
191 |
192 | Object.values(IMAGES).forEach(image => {
193 | if (image) {
at Function.<anonymous> (src/ApplePass.ts:190:38)
at fulfilled (src/ApplePass.ts:5:58)
● ApplePass › should zip to Buffer
Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● ApplePass › should zip to Buffer
TypeError: Cannot read property 'wwdrca' of undefined
23 |
24 | constructor({ passJson, images, manifest, certs }: IApplePassConfig) {
> 25 | if (!certs.wwdrca) {
| ^
26 | throw new Error("must include wwrd CA cert");
27 | }
28 |
at new ApplePass (src/ApplePass.ts:25:20)
at src/ApplePass.spec.ts:355:22
at src/ApplePass.spec.ts:8:71
at Object.<anonymous>.__awaiter (src/ApplePass.spec.ts:4:12)
at Object.it (src/ApplePass.spec.ts:354:43)
Test Suites: 2 failed, 5 passed, 7 total
Tests: 30 failed, 53 passed, 83 total
Snapshots: 0 total
Time: 35.685s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! passninja-passkit@1.0.0 test: `jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the passninja-passkit@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rgrundy/.npm/_logs/2019-12-10T10_12_47_207Z-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment