strings-test.js 521 B

1234567891011121314151617181920
  1. import { startsWith, endsWith } from '../../../utils/strings';
  2. import { module, test } from 'qunit';
  3. module('strings');
  4. test('startsWith works', function(assert) {
  5. assert.expect(3);
  6. assert.ok(startsWith("Boberson", "Bob"));
  7. assert.ok(!startsWith("Boberson", "bob"));
  8. assert.ok(!startsWith("Bob", "Boberson"));
  9. });
  10. test('endsWith works', function(assert) {
  11. assert.expect(3);
  12. assert.ok(endsWith("Boberson", "son"));
  13. assert.ok(!endsWith("Boberson", "Son"));
  14. assert.ok(!endsWith("Bob", "Boberson"));
  15. });