1 | import chai from 'chai'
|
2 | import { extend, normalize_asset_path } from './../source/common'
|
3 |
|
4 | import path from 'path'
|
5 |
|
6 | chai.should()
|
7 |
|
8 | describe('common functions', function()
|
9 | {
|
10 | it('should normalize asset paths', function()
|
11 | {
|
12 | const project_folder = path.join(__dirname, 'project')
|
13 |
|
14 | normalize_asset_path(path.join(project_folder, 'folder/file.txt'), project_folder).should.equal('./folder/file.txt')
|
15 |
|
16 | normalize_asset_path(path.join(project_folder, '../another/folder/file.txt'), project_folder).should.equal('../another/folder/file.txt')
|
17 | })
|
18 | }) |
\ | No newline at end of file |