diff --git a/packages/resource/package.json b/packages/resource/package.json index 2c3c720..6508cfc 100644 --- a/packages/resource/package.json +++ b/packages/resource/package.json @@ -18,6 +18,8 @@ "files": [ "index.js", "index.js.map", + "test/fixtures/test.json", + "test/fixtures/test2.json", "test.js", "test.js.map" ], diff --git a/packages/resource/test/resource.js b/packages/resource/test/resource.js index 1bdc55d..3c2f2b9 100644 --- a/packages/resource/test/resource.js +++ b/packages/resource/test/resource.js @@ -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', () => {