Skip to content

Commit

Permalink
Simplify Babel test assertions
Browse files Browse the repository at this point in the history
To make the tests pass on my grand old Windows 8 VM.
  • Loading branch information
bep committed Dec 14, 2021
1 parent 6183184 commit 803f572
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions hugolib/resource_chain_babel_test.go
Expand Up @@ -133,27 +133,9 @@ Transpiled3: {{ $transpiled.Permalink }}
b.Assert(logBuf.String(), qt.Contains, "babel: Hugo Environment: production")
b.Assert(err, qt.IsNil)

b.AssertFileContent("public/index.html", `
var Car = function Car(brand) {
_classCallCheck(this, Car);
this.carname = brand;
};
`)
b.AssertFileContent("public/index.html", `
var Car2 = function Car2(brand) {
_classCallCheck(this, Car2);
this.carname = brand;
};
`)
b.AssertFileContent("public/js/main2.js", `
var Car2 = function Car2(brand) {
_classCallCheck(this, Car2);
this.carname = brand;
};
`)
b.AssertFileContent("public/index.html", `var Car =`)
b.AssertFileContent("public/index.html", `var Car2 =`)
b.AssertFileContent("public/js/main2.js", `var Car2 =`)
b.AssertFileContent("public/js/main2.js.map", `{"version":3,`)
b.AssertFileContent("public/index.html", `
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozL`)
Expand Down

0 comments on commit 803f572

Please sign in to comment.