Skip to content

Commit

Permalink
tests: Remove old Mocha/Saucelab tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnor committed Dec 27, 2017
1 parent 8f9e27f commit ecfaffc
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 357 deletions.
52 changes: 8 additions & 44 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
"use strict";
module.exports = function() {

var banner =
"/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today('yyyy-mm-dd') %> (<%= grunt.template.date('longTime') %>)\n"+
"* Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>; Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n";

var sources = {
scripts: ['Gruntfile.js', 'the-*/*.js', 'the-*/*.html', 'index.js'],
// elements: ['the-*/*.html'],
stylus: ['themes/*/*.styl'],
css: ['themes/*.css'],
tests: ['spec/*.coffee', 'spec/runner.html']
tests: ['__tests__/*.js']
};

var externals = [
Expand All @@ -29,7 +25,7 @@
pkg: this.file.readJSON('package.json'),
exec: {
jest: {
command: 'jest',
command: 'jest --verbose',
},
build_stylus: {
command: 'node ./node_modules/stylus/bin/stylus ' + stylExpand
Expand All @@ -38,22 +34,10 @@
command: 'node ./scripts/build-font-awesome-javascript.js'
}
},
coffee: {
specs: {
options: {
bare: true
},
expand: true,
cwd: 'spec',
src: ['**.coffee'],
dest: 'spec',
ext: '.js'
}
},
browserify: {
vendor: {
files: {
'dist/vendor.js': ['spec/vendor.js'],
'dist/vendor.js': ['./vendor.js'],
},
options: {
require: externals
Expand Down Expand Up @@ -99,7 +83,7 @@
watch: {
scripts: {
files: sources.scripts,
tasks: ['jshint:force', 'browserify:libs'],
tasks: ['jshint:force', 'browserify:libs', 'exec:jest'],
options: {
livereload: true
}
Expand All @@ -119,43 +103,23 @@
},
tests: {
files: sources.tests,
tasks: ['coffee'],
tasks: ['exec:jest'],
options: {
livereload: false
}
},
},
'saucelabs-mocha': {
all: {
options: {
urls: ['http://127.0.0.1:3000/spec/runner.html'],
browsers: [
{
browserName: 'googlechrome',
version: '39'
}
],
build: process.env.TRAVIS_JOB_ID,
testname: 'the-graph browser tests',
tunnelTimeout: 5,
concurrency: 1,
detailedError: true
}
}
}
});

this.loadNpmTasks('grunt-exec');
this.loadNpmTasks('grunt-contrib-watch');
this.loadNpmTasks('grunt-contrib-jshint');
this.loadNpmTasks('grunt-contrib-connect');
this.loadNpmTasks('grunt-contrib-coffee');
this.loadNpmTasks('grunt-contrib-watch');
this.loadNpmTasks('grunt-browserify');
this.loadNpmTasks('grunt-saucelabs');

this.registerTask('dev', ['test', 'watch']);
this.registerTask('dev', ['connect', 'test', 'watch']);
this.registerTask('build', ['exec:build_stylus', 'exec:build_fa', 'browserify:libs', 'browserify:vendor']);
this.registerTask('test', ['jshint:all', 'build', 'coffee:specs', 'exec:jest']);
this.registerTask('test', ['jshint:all', 'build', 'exec:jest']);
this.registerTask('default', ['test']);
};

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Clone the repo
git clone https://github.com/flowhub/the-graph.git # or your own fork on Github
cd the-graph

Build and watch for changes
Run tests, watch for changes

grunt dev
npm start

Open [http://localhost:3000/spec/runner.html](http://localhost:3000/spec/runner.html) for the automated tests,
or [http://localhost:3000/examples/demo-full.html](http://localhost:3000/examples/demo-full.html) for interactive demo.
Expand Down
76 changes: 0 additions & 76 deletions spec/basics.coffee

This file was deleted.

122 changes: 0 additions & 122 deletions spec/editing.coffee

This file was deleted.

19 changes: 0 additions & 19 deletions spec/graphchanges.coffee

This file was deleted.

9 changes: 0 additions & 9 deletions spec/nav.coffee

This file was deleted.

23 changes: 0 additions & 23 deletions spec/runmocha.coffee

This file was deleted.

Loading

0 comments on commit ecfaffc

Please sign in to comment.