| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | var assert = require('assert'); |
||
| 3 | describe('interface', function() { |
||
| 4 | |||
| 5 | let byteData = require('../index.js'); |
||
| 6 | |||
| 7 | it('should find the "ab" among the junk', function() { |
||
| 8 | let index = byteData.findString([1, 0, 1, 100, 97, 98, 2, 2, 0], "ab"); |
||
| 9 | assert.equal(index, 4); |
||
| 10 | }); |
||
| 11 | |||
| 12 | it('should return -1 if the string is not found', function() { |
||
| 13 | let index = byteData.findString([1, 0, 1, 100, 95, 98, 2, 2, 0], "ab"); |
||
| 14 | assert.equal(index, -1); |
||
| 15 | }); |
||
| 16 | }); |
||
| 17 |