344e162366da391c15422e7588484b127d1ed9b1
4 const assert
= require('assert');
5 const common
= require('../../lib/common');
7 describe('Common', function () {
9 describe('fileScope', function () {
10 it('names a file path', function () {
11 const filename
= 'lib/foo/bar.js';
12 const result
= common
.fileScope(filename
)('baz');
13 assert
.strictEqual(result
, 'bar:baz');
15 it('names an index path', function () {
16 const filename
= 'lib/foo/index.js';
17 const result
= common
.fileScope(filename
)('baz');
18 assert
.strictEqual(result
, 'foo:baz');