aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-match-pattern.js
blob: ed51b43bae800faa531bcafeb58f7edf9be31c43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
var { MatchPattern } = require("match-pattern");

exports.ensureMatchPattern = function (test) {
    var pattern = new MatchPattern("https://bugzilla.redhat.com/attachment.cgi");
    console.log("pattern = " + pattern);
    test.assert(pattern.
        test("https://bugzilla.redhat.com/attachment.cgi"), "testing match pattern");
    test.assert(!pattern.
        test("https://bugzilla.redhat.com/attachment.cgi?bugid=676538&action=enter"),
        "testing failing match pattern");
};