@@ -31,8 +31,8 @@ describe('git-revision-webpack-plugin (integration)', function () {
3131 config . output . path = targetBuild
3232 config . plugins = [
3333 new GitRevisionPlugin ( {
34- gitWorkTree : targetProject ,
35- branch : true
34+ branch : true ,
35+ gitWorkTree : targetProject
3636 } )
3737 ]
3838
@@ -70,9 +70,9 @@ describe('git-revision-webpack-plugin (integration)', function () {
7070
7171 it ( 'should support setting the public path' , function ( ) {
7272 var versionPath = path . join ( targetBuild , 'main-master-v1.0.0-1-g9a15b3b.js' )
73- var mainJs = fs . readFileSync ( versionPath )
7473
75- var expectedPublicPath = '__webpack_require__.p = "http://cdn.com/assets/master/v1.0.0-1-g9a15b3b/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2";'
74+ var mainJs = fs . readFileSync ( versionPath , 'utf8' )
75+ var expectedPublicPath = 'r.p="http://cdn.com/assets/master/v1.0.0-1-g9a15b3b/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2"'
7676
7777 expect ( mainJs . indexOf ( expectedPublicPath ) !== - 1 ) . to . eql ( true )
7878 } )
@@ -152,9 +152,9 @@ describe('git-revision-webpack-plugin with lightweightTags option', function ()
152152
153153 it ( 'should support setting the public path' , function ( ) {
154154 var versionPath = path . join ( targetBuild , 'main-master-v2.0.0-beta.js' )
155- var mainJs = fs . readFileSync ( versionPath )
155+ var mainJs = fs . readFileSync ( versionPath , 'utf8' )
156156
157- var expectedPublicPath = '__webpack_require__.p = "http://cdn.com/assets/master/v2.0.0-beta/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2"; '
157+ var expectedPublicPath = 'r.p= "http://cdn.com/assets/master/v2.0.0-beta/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2"'
158158
159159 expect ( mainJs . indexOf ( expectedPublicPath ) !== - 1 ) . to . eql ( true )
160160 } )
0 commit comments