1 | const assert = require('assert');
|
2 | const path = require('path');
|
3 | let importer = require('../namespace/import');
|
4 |
|
5 | describe("import methods (alias for require)", function () {
|
6 |
|
7 | it("should import from the cwd", function () {
|
8 | let val = importer('tests/mocks/import-me');
|
9 | assert.equal(val, 'yep');
|
10 | });
|
11 |
|
12 | it("should import from the cwd using Reverse camelize", function () {
|
13 | let val = importer('QueryUserMocksTests');
|
14 | assert.equal(val, 'yes');
|
15 | });
|
16 |
|
17 | it("should import from the cwd using Reverse camelize with dashed file name", function () {
|
18 | let val = importer('Import-meMocksTests');
|
19 | assert.equal(val, 'yep');
|
20 | });
|
21 |
|
22 | it("should import from the cwd using Reverse camelize with dashed file name and dashed folder name", function () {
|
23 | let val = importer('Foo-barImport-pathMocksTests');
|
24 | assert.equal(val, 'foo');
|
25 | });
|
26 |
|
27 | });
|