Skip to main content

containsAll

Check that an array contains all specified values. Returns true only if all are present.


Examples

Ensure both root and ec2-user exist:

users.map(name).containsAll(["root","ec2-user"])

Example output:

users.map(name).containsAll(["root","ec2-user"])
[failed] [].containsAll()
expected: == []
actual: [
0: "ec2-user"
]