mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-31 21:36:08 +00:00
15 lines
683 B
TypeScript
15 lines
683 B
TypeScript
import { module, test } from 'qunit';
|
|
import { refreshModelForQueryParams } from '@datahub/utils/routes/refresh-model-for-query-params';
|
|
|
|
module('Unit | Utility | route/refresh-model-for-query-params', function() {
|
|
test('it returns the expected object for a list of query params', function(assert) {
|
|
const testParams = ['name', 'type', 'moveset'];
|
|
const result = refreshModelForQueryParams(testParams);
|
|
|
|
assert.ok(result, 'Function runs without errors');
|
|
assert.equal(result.name.refreshModel, true, 'Correctly creates proper object interface');
|
|
|
|
assert.equal(result.moveset.refreshModel, true, 'Correctly creates interface for multiple properties');
|
|
});
|
|
});
|