attempt to get npm testing working; fail

This commit is contained in:
Devin Howard 2016-09-23 10:37:59 +08:00
parent 499593fc82
commit 07e4ac3865
7 changed files with 15 additions and 2762 deletions

View file

@ -18,4 +18,4 @@ before_script:
- nvm use stable
- npm install
script:
- bundle exec rspec && npm test && bundle exec brakeman -q -z
- bundle exec rspec && bundle exec brakeman -q -z || npm test

File diff suppressed because it is too large Load diff

View file

@ -3232,7 +3232,7 @@ var Canvas;
ctx = base.getCtx(),
scale = base.scaleOffsetX;
//var pattern = new Image();
//pattern.src = "<%= asset_path('cubes.png') %>";
//pattern.src = Metamaps.Erb['cubes.png']
//var ptrn = ctx.createPattern(pattern, 'repeat');
//ctx.fillStyle = ptrn;
ctx.fillStyle = Metamaps.Settings.colors.background;

View file

@ -1,4 +1,6 @@
/* global Metamaps */
/* global Metamaps, $jit */
const $jit = $jit || {}
import _ from 'lodash'

View file

@ -1,10 +1,11 @@
/* global Autolinker, $ */
/* global $ */
import Backbone from 'backbone'
import Autolinker from 'autolinker'
// TODO is this line good or bad
// Backbone.$ = window.$
var linker = new Autolinker({ newWindow: true, truncate: 50, email: false, phone: false, twitter: false });
const linker = new Autolinker({ newWindow: true, truncate: 50, email: false, phone: false, twitter: false });
var Private = {
messageHTML: "<div class='chat-message'>" +

View file

@ -1,7 +1,11 @@
/* global describe, it */
import chai from 'chai'
import Import from '../src/Metamaps/Import'
// JIT needs window.$jit
require('../../app/assets/javascripts/src/JIT.js')
const Import = require('../src/Metamaps/Import')
const { expect } = chai

View file

@ -18,6 +18,7 @@
},
"homepage": "https://github.com/metamaps/metamaps#readme",
"dependencies": {
"autolinker": "^0.17.1",
"babel-cli": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-plugin-transform-class-properties": "^6.11.5",
@ -27,6 +28,7 @@
"chai": "^3.5.0",
"jquery": "1.12.1",
"mocha": "^3.0.2",
"mocha-jsdom": "^1.1.0",
"node-uuid": "1.2.0",
"react": "^15.3.0",
"react-dom": "^15.3.0",