• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    JavaScript
  • Created over 13 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

testing AMD modules client and server side

AMD Testing

purpose

Demonstrate how to test async modules (AMD) both in the browser and in NodeJS. RequireJS is the AMD loader, and several testing frameworks will be evaluated. The goal is to find the very best test frameworks for testing AMD modules in both environments.

Mocha

Mocha is working in the browser. Mocha doesn't come with an assertion library, so I'm using the excellent chai.js. ###Browser Testing Open mocha/runner.html in your browser

Jasmine

Jasmine is working.

Browser Testing

Open jasmine/SpecRunner.html in your browser

Node Testing

node runner.js

Make sure you've installed the RequireJS npm package. This allows you to use your AMD modules in Node. NOTE: there are a couple of ways to run Jasmine in Node: 1. use the regular standalone jasmine.js file or 2. use the 3rd party jasmine-node command-line tool. I was not able to get it working with the command-line tool, because it searches for all tests in a specified folder and runs them, and our tests themselves are AMD modules. If jasmine-node could run programmatically this would be no problem, but it doesn't. I did however get the regular jasmine.js to work, creating my own runner.js file. It sets up the global jasmine variables and the RequireJS stuff. Just run node runner.js.

More Repositories

1

csstyle

MOVED TO https://github.com/csstyle/csstyle a modern approach for crafting beautifully maintainable stylesheets
CSS
851
star
2

overmind

Easy module isolation and lazy loading for Angular apps
JavaScript
505
star
3

grunt-release

Release a new version of your Node-based project
JavaScript
390
star
4

macros

macros support for VS Code
JavaScript
166
star
5

wrapjs

RequireJS plugin for wrapping regular scripts as AMD modules
JavaScript
114
star
6

overwatch-hero-picker

Let's build the overwatch hero picker UI with CSS grid & flexbox
CSS
39
star
7

zelda-inventory

Let's build the Zelda: Breath of the Wild inventory UI with web tech
HTML
26
star
8

lessless

compile your project's LESS into CSS and update <links>
JavaScript
24
star
9

play-crank

playing around with crank and friends
TypeScript
9
star
10

richmodels

potential replacement for ngResource in Angular 2
JavaScript
6
star
11

grunt-clear

Grunt task for clearing your terminal.
JavaScript
5
star
12

jsvars-loader

webpack loader for sharing styles in both JS and CSS
JavaScript
5
star
13

cinch.js

Picks up where your micro templating left off.
JavaScript
4
star
14

ng-workshop

Launch Series Tutorial
4
star
15

grunt-symlink

Grunt plugin for creating project symlinks during your build
JavaScript
3
star
16

grip.js

grips and databinding for backbone views
JavaScript
2
star
17

NativeWeb

A demo application built using Native Web ideals, technologies, and best practices.
JavaScript
2
star
18

twilio

test for twilio
1
star
19

grunt-messageformat

JavaScript
1
star
20

photobooth

Domo hack night project
JavaScript
1
star
21

test

1
star
22

servo

1
star
23

buster-core

JavaScript
1
star