Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelzoidl committed Aug 7, 2015
1 parent 8c2a9da commit b050926
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/plugin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Babel Root Import', () => {

describe('transformRelativeToRootPath', () => {
it('returns a string', () => {
const func = plugin.transformRelativeToRootPath();
const func = plugin.transformRelativeToRootPath('');
expect(func).to.be.a('string');
});

Expand All @@ -25,6 +25,12 @@ describe('Babel Root Import', () => {
const result = plugin.transformRelativeToRootPath('~/some/path');
expect(result).to.equal(rootPath);
});

it('throws error if no string is passed', () => {
expect(() => {
plugin.transformRelativeToRootPath();
}).to.throw(Error);
});
});

describe('hasTildeInString', () => {
Expand Down

0 comments on commit b050926

Please sign in to comment.