Speed up large buffer assertions (Refs #101)
This commit is contained in:
@@ -77,8 +77,8 @@ it('shares bytes across versions, staged copies and commands, and scopes downloa
|
|||||||
expect(
|
expect(
|
||||||
Buffer.from(
|
Buffer.from(
|
||||||
await GET({ request: request(credential), params: { sha256: hash } }).arrayBuffer()
|
await GET({ request: request(credential), params: { sha256: hash } }).arrayBuffer()
|
||||||
)
|
).equals(content)
|
||||||
).toEqual(content);
|
).toBe(true);
|
||||||
expect(() => GET({ request: request(otherCredential), params: { sha256: hash } })).toThrow();
|
expect(() => GET({ request: request(otherCredential), params: { sha256: hash } })).toThrow();
|
||||||
closeDb();
|
closeDb();
|
||||||
expect(hosts.getHostOperation(op.id)?.payload).toEqual(payload);
|
expect(hosts.getHostOperation(op.id)?.payload).toEqual(payload);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ it('returns metadata without plugin bytes and lists many artifacts in two querie
|
|||||||
targetRelPath: 'plugin.dll',
|
targetRelPath: 'plugin.dll',
|
||||||
content
|
content
|
||||||
}).version.id;
|
}).version.id;
|
||||||
expect(getVersionContent(id)).toEqual(content);
|
expect(getVersionContent(id)?.equals(content)).toBe(true);
|
||||||
expect(getVersion(id)).not.toHaveProperty('content');
|
expect(getVersion(id)).not.toHaveProperty('content');
|
||||||
expect(getLatestVersion(getVersion(id)!.script_id)).not.toHaveProperty('content');
|
expect(getLatestVersion(getVersion(id)!.script_id)).not.toHaveProperty('content');
|
||||||
expect(listVersions(getVersion(id)!.script_id)[0]).not.toHaveProperty('content');
|
expect(listVersions(getVersion(id)!.script_id)[0]).not.toHaveProperty('content');
|
||||||
|
|||||||
Reference in New Issue
Block a user