mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-04-28 11:53:18 -07:00
Making a first test passing!
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
This commit is contained in:
committed by
onekiloparsec
parent
1bee9c8b77
commit
04e552b7c3
13
tests/unit/Utils.spec.js
Normal file
13
tests/unit/Utils.spec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import {Utils} from '@/js/Utils.ts';
|
||||
|
||||
describe('Utils.ts', () => {
|
||||
beforeEach(() => {
|
||||
delete window.location;
|
||||
window.location = {href: {}, search: ''};
|
||||
});
|
||||
|
||||
it('correctly parse a location parameter', () => {
|
||||
window.location.search = '?survey=DSS';
|
||||
expect(Utils.urlParam('survey')).toEqual('DSS');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user