Skip to content

Commit 2c87fcc

Browse files
committed
tests: refactor
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 716cb59 commit 2c87fcc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/integration/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ async function validate (format, value, specVersion) {
195195
try {
196196
return await new Validation.XmlValidator(specVersion).validate(value)
197197
} catch (err) {
198-
if (err.constructor === Validation.MissingOptionalDependencyError) {
198+
if (err instanceof Validation.MissingOptionalDependencyError) {
199199
// might not be compiled for some Node-versions
200200
// see https://github.com/marudor/libxmljs2/issues/209
201201
return undefined

0 commit comments

Comments
 (0)