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
18
votes
2 answers

What does the "!" character do in nodejs module names?

I've started using the intern library to write functional tests in js, and I realized that I couldn't understand this syntax: var assert = require('intern/chai!assert'); var registerSuite = require('intern!object'); What is the purpose of the !…
gillyb
  • 8,760
  • 8
  • 53
  • 80
16
votes
2 answers

Loading dependencies outside of project directory in the Intern

The answer to this question does not answer my question. I'd like to load dependencies from outside my project root using the Intern as my testing framework. I'm currently working with the following directory structure: www/ project1/ …
jperezov
  • 3,041
  • 1
  • 20
  • 36
14
votes
2 answers

Start Chrome emulation from command line

I use Google Chrome with Intern to run automated tests and I would like to know if there is a way to launch Chrome in emulation mode from CLI or using a specific flag to test mobile rendering. If not, do you know a good workaround ? I could directly…
13
votes
6 answers

unknown error: failed to write prefs file

I keep getting the error while running functional tests using runner with following: selenium 2.44 Chrome Driver Windows Server 2008 R2 Enterprise Error: Error Description: Listening on 0.0.0.0:7000 Starting tunnel... UnknownError: [POST…
Uday
  • 131
  • 1
  • 1
  • 3
13
votes
3 answers

How do I setup Selenium 2 Server so intern can run functional tests locally, on one browser?

I want to try running an Intern functional test (i.e. using webdriver) on a single browser, on the local machine. The doc says that I need a "Selenium 2 Server". How do I setup the server exactly though? Do I need to download and install it…
Bill Keese
  • 1,792
  • 14
  • 29
7
votes
1 answer

How to connect to native Selenium on CircleCI

I'm running a suite of functional tests using Intern and following their advice on connecting to local Selenium with Chromedriver. Locally, everything works well, but on CircleCI I'm getting: Error: [POST http://localhost:4444/wd/hub/session]…
Jon
  • 1,337
  • 1
  • 14
  • 32
7
votes
2 answers

Intern configuration not processing AMD shim

I am trying to test a Require.js project using Intern. I'm running into errors in my tests where jQuery is not defined when jQuery plugins are being loaded. My loader config looks like this: loader: { // Aliased paths paths: { 'dt': 'dt', …
coreyschram
  • 195
  • 3
  • 17
6
votes
0 answers

How to generate unit tests from a JS module automatically?

I have inherited a project with multiple JavaScript files. Each of them has a bunch of functions; the files are defined in AMD style. For instance: math.js define([], function () { return { func1: function (a, b) { return a + b; …
Alex Tereshenkov
  • 3,340
  • 8
  • 36
  • 61
6
votes
1 answer

How to output debugging information from intern functional tests?

When I run a unit test using intern, it writes console.log to the standard output, which is useful when developing the tests. However, functional tests apparently suppress output - writing to console.log does not do anything, and I can not find any…
Benubird
  • 18,551
  • 27
  • 90
  • 141
6
votes
2 answers

setFindTimeout and pollUntil with Intern for elements that are not visible on initial page load

I'm having an issue getting Intern 2 to wait for elements to be present. In Intern 1 I was using wait()to set express time periods for the page to wait for an element to be present after some user action. With Intern 2 there seems to be…
kgstew
  • 472
  • 4
  • 12
6
votes
2 answers

Does intern testing framework have any gulp plug-ins or docs to integrate with gulp?

Does intern testing framework have any gulp plug-ins or docs to integrate with gulp?
Allan McLemore
  • 1,222
  • 2
  • 11
  • 12
6
votes
2 answers

How to load the pollUntil helper in Intern 2 functional tests

The intern 2 documentation gives the following example of waiting for a condition to be true on a test page after loading it: this.remote .get(require.toUrl('./SomeTest.html')) .then(pollUntil('return window.ready;', 5000)); Unfortunately,…
Sebastien Brunot
  • 431
  • 2
  • 10
6
votes
1 answer

Loading dependencies outside of the Intern directory when running tests through Selenium

I have a project where Intern unit tests are supposed to be in a different directory tree than the source code under test. Somewhat like…
joejohndoe
  • 61
  • 1
6
votes
1 answer

Can't get Intern to run Node.js Module

I am trying to test Intern to see if it would be a good fit for a testing framework. I am trying to test the following code in Intern. var HelloWorld; HelloWorld = (function () { function HelloWorld (name) { this.name = name || "N/A"; } …
Nick
  • 600
  • 1
  • 5
  • 13
5
votes
1 answer

Jenkins build fail due to Junit test report not found : Intern Framework

My jenkins version is 1.608 and JUnit plugin is 1.2beta 4. When I run the test locally I can see that the reports are correctly generated but when I run the build it fails [also I dont see the reports in the folder]. The folder structure looks like…
8785krs
  • 101
  • 1
  • 1
  • 9
1
2 3
37 38