chai-include-ordered-with-gaps
A Chai plugin to solve Issue #1506: How can I test for an ordered subset with gaps between the elements?.
Installing
npm install --save-dev chai-include-ordered-with-gaps
Using
const chai = ;const expect should assert = chai; ;chai; toincludeorderedmemberswith; 1 2 3 4 5shouldincludeorderedmemberswith; assert;
Works with TypeScript too (inline declarations, no need to install a @types package).