diff --git a/scripts/invoke.sh b/scripts/invoke.sh index 88ce1891..c670bc38 100755 --- a/scripts/invoke.sh +++ b/scripts/invoke.sh @@ -13,6 +13,7 @@ DEBUG=${DEBUG=false} filename=$(basename $test_location) tmp_location=/tmp/bearer-scan/$filename mkdir -p /tmp/bearer-scan +rm -rf $tmp_location cp -R $test_location $tmp_location if [ -n "$BEARER_BIN" ]; then $BEARER_BIN scan $tmp_location \ diff --git a/tests/javascript/third_parties/marked/test.js b/tests/javascript/third_parties/marked/test.js index 511bef90..0bb7c549 100644 --- a/tests/javascript/third_parties/marked/test.js +++ b/tests/javascript/third_parties/marked/test.js @@ -1,39 +1,33 @@ -const { - createNewInvoker, - getEnvironment, -} = require("../../../helper.js") +const { createNewInvoker, getEnvironment } = require("../../../helper.js") const { ruleId, ruleFile, testBase } = getEnvironment(__dirname) describe(ruleId, () => { const invoke = createNewInvoker(ruleId, ruleFile, testBase) - // FIXME: investigate - CI failure! - // passes individually, fails when run together with - // dom_purify test case - // test("insecure", () => { - // const testCase = "insecure" + test("insecure", () => { + const testCase = "insecure" - // const results = invoke(testCase) + const results = invoke(testCase) - // expect(results.Missing).toEqual([]) - // expect(results.Extra).toEqual([]) - // }) + expect(results.Missing).toEqual([]) + expect(results.Extra).toEqual([]) + }) - test("not_used", () => { - const testCase = "not_used" + test("not_used", () => { + const testCase = "not_used" - const results = invoke(testCase) + const results = invoke(testCase) - expect(results.Missing).toEqual([]) - expect(results.Extra).toEqual([]) - }) + expect(results.Missing).toEqual([]) + expect(results.Extra).toEqual([]) + }) - test("secure", () => { - const testCase = "secure" + test("secure", () => { + const testCase = "secure" - const results = invoke(testCase) + const results = invoke(testCase) - expect(results.Missing).toEqual([]) - expect(results.Extra).toEqual([]) - }) -}) \ No newline at end of file + expect(results.Missing).toEqual([]) + expect(results.Extra).toEqual([]) + }) +})