mirror of https://github.com/status-im/consul.git
18 lines
533 B
JavaScript
18 lines
533 B
JavaScript
|
import { module, test } from 'qunit';
|
||
|
import { setupRenderingTest } from 'ember-qunit';
|
||
|
import { render } from '@ember/test-helpers';
|
||
|
import hbs from 'htmlbars-inline-precompile';
|
||
|
|
||
|
module('helper:substr', function(hooks) {
|
||
|
setupRenderingTest(hooks);
|
||
|
|
||
|
// Replace this with your real tests.
|
||
|
test('it returns last 2 characters of string', async function(assert) {
|
||
|
this.set('inputValue', 'd9a54409-648b-4327-974f-62a45c8c65f1');
|
||
|
|
||
|
await render(hbs`{{substr inputValue -4}}`);
|
||
|
|
||
|
assert.dom('*').hasText('65f1');
|
||
|
});
|
||
|
});
|