-
-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added a generatePluginName method in generators utils
Added generatePluginName in generators/utils/plugins.ts and also moved the replaceAt method from add-generator.ts to generators/utils/plugins.ts. Added tests for the plugin name method
- Loading branch information
1 parent
b7328c6
commit 7d83453
Showing
3 changed files
with
56 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { generatePluginName } from "../utils/plugins" | ||
|
||
describe("generatePluginName", () => { | ||
it("should return webpack Standard Plugin Name for Name : extract-text-webpack-plugin", () => { | ||
const pluginName = generatePluginName("extract-text-webpack-plugin"); | ||
expect(pluginName).toEqual("ExtractTextWebpackPlugin"); | ||
}); | ||
|
||
it("should return webpack Standard Plugin Name for Name : webpack.DefinePlugin", () => { | ||
const pluginName = generatePluginName("webpack.DefinePlugin"); | ||
expect(pluginName).toEqual("Webpack.DefinePlugin"); | ||
}); | ||
}); | ||
|
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