projects
/
squeep-log-helper
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81cb05b
)
add test for root level
author
Justin Wind
<justin.wind+git@gmail.com>
Sat, 4 May 2024 20:34:21 +0000
(13:34 -0700)
committer
Justin Wind
<justin.wind+git@gmail.com>
Sat, 4 May 2024 20:34:21 +0000
(13:34 -0700)
test/lib/file-scope.js
patch
|
blob
|
history
diff --git
a/test/lib/file-scope.js
b/test/lib/file-scope.js
index b8fc12386ab8710d5c30a7957a53153bc2ec9c2c..44749110cbadb3886ee7e3b4c371cb81d28cd326 100644
(file)
--- a/
test/lib/file-scope.js
+++ b/
test/lib/file-scope.js
@@
-276,6
+276,17
@@
describe('File Scope', function () {
assert.strictEqual(result, 'deep:method');
});
+ it('handles package root file', function () {
+ filepath = '/path/to/package/server.js';
+ fs.statSync.restore();
+ sinon.stub(fs, 'statSync')
+ .throws(noentError)
+ .onCall(0).returns() // packageBase found
+ ;
+ const result = fileScope(filepath)(method);
+ assert.strictEqual(result, 'server:method');
+ });
+
}); // fileScope