test: add spec for buffer shim

This commit is contained in:
bcheidemann 2021-03-07 15:21:28 +00:00
parent 15be384940
commit 3a8a59d362
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
'use strict';
const expect = require('chai').expect;
const bufferDefault = require('../../../shims/buffer').default;
const bufferNamed = require('../../../shims/buffer').Buffer;
const bufferActual = require('../../../src/index').Buffer;
describe.only('path shim', () => {
it('default export should be defined', () => {
expect(bufferDefault).to.not.be.undefined;
});
it('named export should be defined', () => {
expect(bufferNamed).to.not.be.undefined;
});
it('default export should be re-exposing Buffer', () => {
expect(bufferDefault).to.equal(bufferActual);
});
it('named export should be re-exposing Buffer', () => {
expect(bufferNamed).to.equal(bufferActual);
});
});