billing: Add node test for is_in_array.

This commit is contained in:
Vishnu Ks 2019-01-02 16:30:51 +05:30 committed by Rishi Gupta
parent 2547d4ea07
commit 9e9bd2456f
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
set_global('$', global.make_zjquery());
set_global('page_params', {});
zrequire('helpers', "js/billing/helpers");
run_test("is_in_array", () => {
var good_houses_array = ["Gryffindor", "Hufflepuff", "Ravenclaw"];
assert.equal(helpers.is_in_array("Hufflepuff", good_houses_array), true);
assert.equal(helpers.is_in_array("Slytherin", good_houses_array), false);
});