Test setup
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "5"
@@ -1,4 +1,5 @@
# Flasher.js
+[](https://travis-ci.org/thingsSDK/flasher.js)
_Flasher.js_ is a tool to get JavaScript running natively on
the Internet of Things device, ESP8266. This application runs on
@@ -4,7 +4,8 @@
"description": "A GUI tool for flashing the Espruino JavaScript runtime on Adafruit Huzzah (ESP8366 based) boards",
"main": "index.js",
"scripts": {
- "start": "electron index.js"
+ "start": "electron index.js",
+ "test": "mocha"
},
"repository": {
"type": "git",
@@ -32,6 +33,8 @@
"unzip": "^0.1.11"
"devDependencies": {
- "electron-prebuilt": "^0.36.9"
+ "chai": "^3.5.0",
+ "electron-prebuilt": "^0.36.9",
+ "mocha": "^2.4.5"
}
@@ -0,0 +1,14 @@
+'use strict';
+
+const expect = require('chai').expect;
+const RomComm = require('../back-end/rom_comm');
+describe('ESP8266', () => {
+ const boards = require('../back-end/boards');
+ it('defaults to the Esp12', () => {
+ var esp = new RomComm({
+ portName: 'TEST'
+ });
+ expect(esp.board).to.be.an.instanceof(boards.Esp12);
+});