1.0.0
Deno module to test a RegExp to a list of string matches
Repository
Current version released
3 years ago
Dependencies
std
Versions
AssertMatches
A convenience function for testing RegExp objects in Deno, this module provides a function to test a if every item in a list of strings is matched by a RegExp. Useful for unit testing and reducing repetition in code.
Usage:
import { assertMatches } from 'https://deno.land/x/assert_matches/mod.ts'
Deno.test('Matches strings correctly', () => {
assertMatches(
['hello world','deno world','beautiful world','other world'],
/\w+ world/
);
}
);