I am using QUnit with JsMockito (1.0.4) and JsHamcrest (0.5.2) to test a JavaScript based application. After invoking the statement, var notificationAdapter = mock( LocalNotificationAdapter ); within QUnit module:setup() function, my page is redirected to:
Following is the HTML snippet from index.html that includes the libraries:
<!-- Include QUnit Library -->
<link rel="stylesheet" href="/og/lib/qunit/css/qunit.css">
<script src="/og/lib/qunit/js/qunit.js"></script>
<!-- Include JsHamcrest and JsMockito Library -->
<script src="/og/lib/jsmockito/jsmockito-1.0.4.js"></script>
<script src="/og/lib/jshamcrest/jshamcrest-0.5.2.js"></script>
<script type="text/javascript">
JsHamcrest.Integration.QUnit();
JsMockito.Integration.QUnit();
</script>
<!-- And here is my actual test file. -->
<script src="/og/test/models/reminders/ReminderModelTest.js"></script>
I haven't encountered this issue. You probably want to work out where the redirection is occurring (inside your application) and figure out why. I'd guess that you'll need to stub a method on the mock.
I am using QUnit with JsMockito (1.0.4) and JsHamcrest (0.5.2) to test a JavaScript based application. After invoking the statement,
var notificationAdapter = mock( LocalNotificationAdapter );
within QUnit module:setup() function, my page is redirected to:from a page at
localhost/og/test/index.html.
Below is the output of the decoded URL:The following is a console output that I get running within Google Chrome (Version 23.0.1271.95 m):
Following is the HTML snippet from index.html that includes the libraries:
Here is the actual test execution:
Have you encountered this issue? I would appreciate any help.