Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.0.11
- fixed $' replace issue

# 0.0.10
- fixed issue of not escaped chars in logs

Expand Down
4 changes: 2 additions & 2 deletions formatter/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class HTMLFormatter extends JsonFormatter {
this.log = function(json) {
const htmlTemplate = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf-8');
log(htmlTemplate
.replace('METADATA', JSON.stringify(this.metadata, null, 0))
.replace('SOURCE_DATA', JSON.stringify(JSON.parse(json), null, 0)));
.replace('METADATA', () => JSON.stringify(this.metadata, null, 0))
.replace('SOURCE_DATA', () => JSON.stringify(JSON.parse(json), null, 0)));
}
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qavajs/html-formatter",
"version": "0.0.10",
"version": "0.0.11",
"main": "formatter/formatter.js",
"scripts": {
"report:compile": "node test/compile_report.js",
Expand Down
3 changes: 3 additions & 0 deletions test/features/Logs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Feature: Logs

Scenario: scenario failed with logs
And failed step with log

Scenario: scenario dollar replace
And I expect 'some string' to match '^120$'
2 changes: 2 additions & 0 deletions test/step_definitions/custom_steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ When('failed step with log', function () {
throw new Error('failed step');
});

When(`I expect {string} to match {string}`, async function (one, two) {});