We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c2a9da commit b050926Copy full SHA for b050926
test/plugin.spec.js
@@ -16,7 +16,7 @@ describe('Babel Root Import', () => {
16
17
describe('transformRelativeToRootPath', () => {
18
it('returns a string', () => {
19
- const func = plugin.transformRelativeToRootPath();
+ const func = plugin.transformRelativeToRootPath('');
20
expect(func).to.be.a('string');
21
});
22
@@ -25,6 +25,12 @@ describe('Babel Root Import', () => {
25
const result = plugin.transformRelativeToRootPath('~/some/path');
26
expect(result).to.equal(rootPath);
27
28
+
29
+ it('throws error if no string is passed', () => {
30
+ expect(() => {
31
+ plugin.transformRelativeToRootPath();
32
+ }).to.throw(Error);
33
+ });
34
35
36
describe('hasTildeInString', () => {
0 commit comments