Only auto-load .cson and .json keymap files

This now prevents files such as .DS_Store from being loaded as a
keymap where previously all paths were loaded regardless of extension.

Closes #205
This commit is contained in:
Kevin Sawicki
2013-01-31 12:01:02 -08:00
parent e24859cc23
commit 379a4a4d8d
6 changed files with 24 additions and 12 deletions

View File

@@ -128,3 +128,8 @@ describe "fs", ->
describe ".md5ForPath(path)", ->
it "returns the MD5 hash of the file at the given path", ->
expect(fs.md5ForPath(require.resolve('fixtures/sample.js'))).toBe 'dd38087d0d7e3e4802a6d3f9b9745f2b'
describe ".list(path, extensions)", ->
it "returns the paths with the specified extensions", ->
path = require.resolve('fixtures/css.css')
expect(fs.list(require.resolve('fixtures'), ['.css'])).toEqual [path]