Skip to content

Commit

Permalink
update diagnostic-channel-publishers to 0.3.1 (#509)
Browse files Browse the repository at this point in the history
* update diagnostic-channel-publishers to 0.3.1

* updates for node12 compat

* run functionals on node12
  • Loading branch information
markwolff committed Apr 23, 2019
1 parent 9e9d915 commit c664918
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -4,6 +4,7 @@ services:
- docker
node_js:
- "node"
- "12"
- "11"
- "10"
- "9"
Expand All @@ -24,7 +25,7 @@ before_script:
script:
- npm test
# Run funcs for current release
- if [ "$TRAVIS_NODE_VERSION" = "11" ]; then npm run functionaltest; fi
- if [ "$TRAVIS_NODE_VERSION" = "12" ]; then npm run functionaltest; fi
# Run funcs for LTS releases (currently 6, 8, 10)
- if [ "$TRAVIS_NODE_VERSION" = "10" ]; then npm run functionaltest; fi
- if [ "$TRAVIS_NODE_VERSION" = "8" ]; then npm run functionaltest; fi
Expand Down
29 changes: 21 additions & 8 deletions Tests/Library/Util.tests.ts
Expand Up @@ -231,14 +231,27 @@ describe("Library/Util", () => {
circObj.test = true;
circObj.circular = circObj;
circObj.arr = [0, 1, circObj.circular];
assert.deepEqual(
Util.validateStringMap(circObj),
{
test: "true",
circular: "Object (Error: Converting circular structure to JSON)",
arr: "Array (Error: Converting circular structure to JSON)",
}
);
var nodeVer = process.versions.node.split(".");
if (parseInt(nodeVer[0]) >= 12) {
// node12 changed the error string
assert.deepEqual(
Util.validateStringMap(circObj),
{
test: "true",
circular: "Object (Error: Converting circular structure to JSON\n --> starting at object with constructor 'Object'\n --- property 'circular' closes the circle)",
arr: "Array (Error: Converting circular structure to JSON\n --> starting at object with constructor 'Object'\n --- property 'circular' closes the circle)",
}
);
} else {
assert.deepEqual(
Util.validateStringMap(circObj),
{
test: "true",
circular: "Object (Error: Converting circular structure to JSON)",
arr: "Array (Error: Converting circular structure to JSON)",
}
);
}
});
});

Expand Down
6 changes: 3 additions & 3 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
Expand Up @@ -61,6 +61,6 @@
"cls-hooked": "^4.2.2",
"continuation-local-storage": "^3.2.1",
"diagnostic-channel": "0.2.0",
"diagnostic-channel-publishers": "0.3.0"
"diagnostic-channel-publishers": "^0.3.1"
}
}

0 comments on commit c664918

Please sign in to comment.