Questions tagged [intern]

A JavaScript testing framework.

Description

Intern is an open-source project hosted on GitHub. It is a complete test stack for JavaScript designed to help you write and run consistent, high-quality test cases for your JavaScript libraries and applications. It can be used to test any JavaScript code.

External links

556 questions
2
votes
1 answer

How to unit test a non AMD JavaScript file using Intern?

I have a non AMD JavaScript file with a class Snake like so: // ./www/js/Snake.js function Snake(initPos) { this.pos = initPos; } // I want to unit test this method. Snake.proptotype.move = function(dir) { // Do things. }; I wrote an Intern…
SBel
  • 3,315
  • 6
  • 29
  • 47
2
votes
1 answer

Can I run a functional test using theintern js framework without setting up a standalone selenium server?

I have a working webdriver javascript test script for my html page that runs using ChromeDriver without needing to start up a selenium standalone server: test.js 'use strict'; var path = require('path'); var webdriver =…
robd
  • 9,646
  • 5
  • 40
  • 59
2
votes
0 answers

Intern integration with Visual Studio 2013

ENVIRONMENT We are currently using 2 Chutzpah packages (this and this) in Visual Studio 2013 Update 4 to enable us to execute individual Jasmine unit tests (with Chutzpah context menu "Open in Browser") against an angular application we are…
Andrew Gray
  • 3,593
  • 3
  • 35
  • 62
2
votes
2 answers

What does exclamation mark mean inside Intern's define?

When looking at the Intern.io examples, I'm not following the path syntax. For example: define([ 'intern!object', 'intern/chai!assert', What's going on with the '!' character? // Non-functional test suite(s) to run in each browser suites: […
bkuhl
  • 59
  • 1
  • 7
2
votes
0 answers

Intern.js and google closure compiler

I would like to not explicitly set my dependency tree for every single module I want to test. For example, in my main App module, maybe I require a Base module which requires three other submodules. It's a pain trying to figure out the exact…
Evan
  • 5,975
  • 8
  • 34
  • 63
2
votes
1 answer

Intern - ReferenceError: document is not defined

Seeing this Error message when I'm trying to run Intern tests from within my test files dir. the (relevant) structure of the dir…
EBr
  • 21
  • 4
2
votes
1 answer

How do I load the node.js http module from within an intern.js test?

I am attempting to use the Intern test framework to automate testing of a simple REST API implemented with node.js and StrongLoop. StrongLoop provides an explorer web page that I have used to validate that the REST API is implemented and I can…
mw1967
  • 43
  • 6
2
votes
1 answer

Local functional tests start after more then 1 minute

I have the same tests, the same selenium-server-standalone (2.43.1) and chromedriver (2.10). I have only functional tests (no unit tests). My Chrome is at version 37. My OSX is at version 10.9.5. Java version is 1.7.0_51 (Java 7 update 67). When I…
bumbu
  • 1,297
  • 11
  • 29
2
votes
1 answer

getting angular and intern.io working together

I'm trying to set up Intern.io so I can test my angular app. I'm also using Grunt and Bower. I'm just trying to get barebones watch task that automatically runs the tests. My problem when I try to run tests is I get the following error…
Evan
  • 5,975
  • 8
  • 34
  • 63
2
votes
2 answers

How do you wait for element to load in functional tests with Intern 2?

I am trying to make an integration test with Intern 2, meaning I will need to navigate web pages or wait for ajax to test certain things. This means waiting for elements to appear, which Intern 1 supported. I have looked at pollUntil in leadfoot,…
2
votes
1 answer

Explicit selenium waits in intern

How can I use explicit waits using intern's leadfoot API for functional testing in intern? There are multiple scenarios where I want to explicitly poll until a condition is met. For example, I want to wait until two or more elements exist in the…
Michael
  • 5,994
  • 7
  • 44
  • 56
2
votes
1 answer

Intern.js is failing to launch Chrome 37, or Latest FireFox 32

I am using the latest intern 2.0.3 against selenium-server-standalone 2.42.2, it works fine with FireFox 31 or Chrome 36. Firefox 32 hangs up and won't launch, as does Chrome > 36. I am sure it is in selenium-server and some change, not intern, but…
httpete
  • 2,765
  • 26
  • 34
2
votes
1 answer

Intern Leadfoot run commands conditionally

Using Selenium driver, IE remains logged in between sessions while FF and Chrome do not. I would like to execute a few additional commands in a test based on the existence of the "signed-in" element ID. How can I execute code based on a condition in…
lacy
  • 475
  • 3
  • 11
2
votes
1 answer

Intern Leadfoot WaitForAddedById functionality?

How can I simulate this feature? It seems like a conscious choice to have a WaitForDeletedById but not the reverse. Upon an ajax load, how can I wait for the existence of a new element on the page, rather than the absence of one?
lacy
  • 475
  • 3
  • 11
2
votes
1 answer

How do you poll for a condition in Intern / Leadfoot (not browser / client side)?

I'm trying to verify that an account was created successfully, but after clicking the submit button, I need to wait until the next page has loaded and verify that the user ended up at the correct URL. I'm using pollUntil to check the URL client…
jon_wu
  • 1,113
  • 11
  • 26