Skip to content

Commit bd93dc3

Browse files
committed
getServePath spec
1 parent 2df0075 commit bd93dc3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import getServePath from '.';
2+
3+
describe('getServePath', () => {
4+
it('returns undefined for dir thats not a string', () => {
5+
expect(getServePath(2)).toEqual({ serveDir: undefined });
6+
});
7+
8+
it('returns undefined for subdir thats not a string', () => {
9+
expect(getServePath(2, 2)).toEqual({ serveDir: undefined });
10+
});
11+
12+
it('returns joined path for serveDir', () => {
13+
expect(getServePath('example', 'path')).toEqual({
14+
serveDir: 'example/path',
15+
});
16+
});
17+
});

0 commit comments

Comments
 (0)