UNPKG

dojo

Version:

Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.

24 lines (22 loc) 726 B
define([ 'require', 'intern!object', 'intern/chai!assert', '../../support/ready' ], function (require, registerSuite, assert, ready) { registerSuite({ name: 'dojo/hash', sethash: function () { return ready(this.get('remote'), require.toUrl('./basehref.html')) .findById('sethash').click().end() .execute('return window.location.href').then(function(url){ assert.isTrue(/basehref\.html#myhash1$/.test(url), 'setHash("myhash1"), location.href: ' + url); }) .findById('sethashtrue').click().end() .execute('return window.location.href').then(function(url){ assert.isTrue(/basehref\.html#myhash2$/.test(url), 'setHash("myhash1", true), location.href: ' + url); }) } }); });