From 1debf35bdfdf20e175d3009ac2a8e08e0d258c5a Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Wed, 11 Mar 2015 11:26:52 +0100 Subject: [PATCH] Adjust tests for hash urls --- spec/HtmlWebpackPluginSpec.js | 30 ++++++++++++++++-------------- spec/fixtures/test.html | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/spec/HtmlWebpackPluginSpec.js b/spec/HtmlWebpackPluginSpec.js index e737806..96a2cd0 100644 --- a/spec/HtmlWebpackPluginSpec.js +++ b/spec/HtmlWebpackPluginSpec.js @@ -17,7 +17,7 @@ function testHtmlPlugin(webpackConfig, expectedResults, outputFile, done) { if (expectedResult instanceof RegExp) { expect(htmlContent).toMatch(expectedResult); } else { - expect(htmlContent).toContain(expectedResult); + expect(htmlContent).toContain(expectedResult.replace('%hash%', stats.hash)); } } done(); @@ -37,7 +37,7 @@ describe('HtmlWebpackPlugin', function() { filename: 'index_bundle.js' }, plugins: [new HtmlWebpackPlugin()] - }, [' +