strings-test.js 479 B

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