-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add webpack.ResolverPlugin support * Add tests * Fix tests
- Loading branch information
Showing
5 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
resolvers/webpack/test/files/node_modules/webpack-resolver-plugin-test/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
var chai = require('chai') | ||
, expect = chai.expect | ||
, path = require('path') | ||
|
||
var webpack = require('../index') | ||
|
||
var file = path.join(__dirname, 'files', 'dummy.js') | ||
|
||
describe("plugins", function () { | ||
var resolved, aliasResolved | ||
|
||
before(function () { | ||
resolved = webpack.resolve('./some/bar', file) | ||
aliasResolved = webpack.resolve('some-alias/bar', file) | ||
}) | ||
|
||
it("work", function () { | ||
expect(resolved).to.have.property('found', true) | ||
}) | ||
|
||
it("is correct", function () { | ||
expect(resolved).to.have.property('path') | ||
.and.equal(path.join(__dirname, 'files', 'some', 'bar', 'bar.js')) | ||
}) | ||
|
||
it("work with alias", function () { | ||
expect(aliasResolved).to.have.property('found', true) | ||
}) | ||
}) |