Updated the test system
This commit is contained in:
12
test/getURLParameters.test.js
Normal file
12
test/getURLParameters.test.js
Normal file
@ -0,0 +1,12 @@
|
||||
const expect = require('expect');
|
||||
const {getURLParameters} = require('./_30s.js');
|
||||
|
||||
test('getURLParameters is a Function', () => {
|
||||
expect(getURLParameters).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Returns an object containing the parameters of the current URL', () => {
|
||||
expect(getURLParameters('http://url.com/page?name=Adam&surname=Smith')).toEqual({
|
||||
name: 'Adam',
|
||||
surname: 'Smith'
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user