Sha256: 52d2661dc5f96dd996ae3e0a836af57c4965912012e7980153bfcc28e93e8f17

Contents?: true

Size: 976 Bytes

Versions: 78

Compression:

Stored size: 976 Bytes

Contents

// ignore most things
var IgnoreFile = require("../")

// set the ignores just for this test
var c = require("./common.js")
c.ignores({ ".ignore": ["*", "!a/b/c/.abc", "!/c/b/a/cba"] })

// the only files we expect to see
var expected =
  [ "/a/b/c/.abc"
  , "/a"
  , "/a/b"
  , "/a/b/c"
  , "/c/b/a/cba"
  , "/c"
  , "/c/b"
  , "/c/b/a" ]

require("tap").test("basic ignore rules", function (t) {
  t.pass("start")

  IgnoreFile({ path: __dirname + "/fixtures"
             , ignoreFiles: [".ignore"] })
    .on("ignoreFile", function (e) {
      console.error("ignore file!", e)
    })
    .on("child", function (e) {
      var p = e.path.substr(e.root.path.length)
      var i = expected.indexOf(p)
      if (i === -1) {
        t.fail("unexpected file found", {file: p})
      } else {
        t.pass(p)
        expected.splice(i, 1)
      }
    })
    .on("close", function () {
      t.notOk(expected.length, "all expected files should be seen")
      t.end()
    })
})

Version data entries

78 entries across 78 versions & 4 rubygems

Version Path
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.13 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.12 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.11 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.10 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.9 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.8 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.7 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js
brwy_rails-0.0.6 test/dummy/node_modules/fsevents/node_modules/fstream-ignore/test/ignore-most.js
brwy_rails-0.0.5 test/dummy/node_modules/fsevents/node_modules/fstream-ignore/test/ignore-most.js
trusty-festivity-extension-2.5.6 node_modules/bower/node_modules/fstream-ignore/test/ignore-most.js