fix: tests

This commit is contained in:
cha0s 2021-01-05 03:39:05 -06:00
parent af2d0d5185
commit 407e7c9f03
2 changed files with 4 additions and 2 deletions

View File

@ -18,6 +18,8 @@
"files": [
"index.js",
"index.js.map",
"test/fixtures/test.json",
"test/fixtures/test2.json",
"test.js",
"test.js.map"
],

View File

@ -33,7 +33,7 @@ describe('@avocado/resource', () => {
describe('Resource', () => {
it("can read resources", async () => {
const buffer = await Resource.read('/test.json');
expect(Buffer.compare(testJsonBuffer, buffer)).to.equal(0);
expect(Buffer.compare(testJsonBuffer, Buffer.from(buffer))).to.equal(0);
});
it("generates unique uuids", async () => {
const resources = [
@ -46,7 +46,7 @@ describe('@avocado/resource', () => {
});
it("can be subclassed", async () => {
const resource = await ResourceSubclass.load('/test.json');
expect(Buffer.compare(testJsonBuffer, resource.buffer)).to.equal(0);
expect(Buffer.compare(testJsonBuffer, Buffer.from(resource.buffer))).to.equal(0);
});
});
describe('JsonResource', () => {