Skip to content

Commit

Permalink
testing no-unresolved edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Nov 14, 2015
1 parent 9f73c49 commit 09ffebd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/src/rules/no-unresolved.js
Expand Up @@ -69,6 +69,21 @@ ruleTester.run('no-unresolved', rule, {
test({ code: 'require(["./does-not-exist"])'
, options: [{ amd: true }]}),
test({ code: 'define(["./does-not-exist"], function (bar) {})' }),

// stress tests
test({ code: 'require("./does-not-exist", "another arg")'
, options: [{ commonjs: true, amd: true }]}),
test({ code: 'proxyquire("./does-not-exist")'
, options: [{ commonjs: true, amd: true }]}),
test({ code: '(function() {})("./does-not-exist")'
, options: [{ commonjs: true, amd: true }]}),
test({ code: 'define([0, foo], function (bar) {})'
, options: [{ amd: true }]}),
test({ code: 'require(0)'
, options: [{ commonjs: true }]}),
test({ code: 'require(foo)'
, options: [{ commonjs: true }]}),

],

invalid: [
Expand Down

0 comments on commit 09ffebd

Please sign in to comment.