From 2c87fcc6922bbe66192fd99d679676456aad0bcf Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Sat, 18 May 2024 22:43:35 +0200 Subject: [PATCH] tests: refactor Signed-off-by: Jan Kowalleck --- tests/integration/index.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/index.test.js b/tests/integration/index.test.js index bdd7c32c..edd087c1 100644 --- a/tests/integration/index.test.js +++ b/tests/integration/index.test.js @@ -195,7 +195,7 @@ async function validate (format, value, specVersion) { try { return await new Validation.XmlValidator(specVersion).validate(value) } catch (err) { - if (err.constructor === Validation.MissingOptionalDependencyError) { + if (err instanceof Validation.MissingOptionalDependencyError) { // might not be compiled for some Node-versions // see https://github.com/marudor/libxmljs2/issues/209 return undefined