forked from GameJs/gamejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuri.js
21 lines (16 loc) · 748 Bytes
/
uri.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var uri = require('gamejs/utils/uri');
qModule('gamejs/utils/uri');
var data = [
['http://gamejs.org/example', ['http://gamejs.org/', './example']],
['http://gamejs.org/example/', ['http://gamejs.org/example/', '../example/']],
['http://gamejs.org/example', ['http://gamejs.org/example/data/', '../../example']],
['http://gamejs.org/for/ever/', ['http://gamejs.org/', './for/ever/']],
['http://gamejs.org/for/ever/', ['http://gamejs.org/test/data', '../../for/ever/']],
['http://gamejs.org/example', ['http://gamejs.org/test/data', 'http://gamejs.org/example']]
];
test('resolve', function() {
data.forEach(function(res) {
strictEqual(uri.resolve.apply(this, res[1]), res[0]);
});
});
// FIXME Document.fromURL() unit test