mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
includes
This commit is contained in:
21
inputs/passing/stringMethods/includes.ts
Normal file
21
inputs/passing/stringMethods/includes.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// test_output! [[true,true,true,true,true,true],[false,false,false,false]]
|
||||
|
||||
export default function () {
|
||||
const positive = [
|
||||
"foobar".includes("foo"),
|
||||
"foobar".includes("bar"),
|
||||
"foobar".includes("oob"),
|
||||
"foobar".includes(""),
|
||||
"foobar".includes("foobar"),
|
||||
"foobar".includes("bar", 1),
|
||||
];
|
||||
|
||||
const negative = [
|
||||
"foobar".includes("baz"),
|
||||
"foobar".includes("qux"),
|
||||
"foobar".includes("oob", 4),
|
||||
"foobar".includes("foo", 1),
|
||||
];
|
||||
|
||||
return [positive, negative];
|
||||
}
|
||||
Reference in New Issue
Block a user