Permalink
Browse files

Tests: eliminate need for requiring mock-firmata from within board.js

Relevant to gh-1101

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information...
1 parent 7a2696f commit 624dc7af1d3f9fbbef95dfe76d8b1b8dd75fcb3d @rwaldron committed Apr 13, 2016
Showing with 1,010 additions and 2,480 deletions.
  1. +2 −1 .jshintrc
  2. +2 −2 Gruntfile.js
  3. +1 −3 lib/board.js
  4. +87 −0 test/.jshintrc
  5. +57 −86 test/accelerometer.js
  6. +1 −23 test/altimeter.js
  7. +22 −29 test/animation.js
  8. +22 −48 test/barometer.js
  9. +1 −7 test/board-connection.js
  10. +0 −21 test/board.component.js
  11. +0 −20 test/board.controller.js
  12. +27 −70 test/board.js
  13. +0 −2 test/board.pins.js
  14. +0 −1 test/bootstrap/bootstrap.js
  15. +0 −21 test/button.js
  16. +0 −18 test/capabilities.js
  17. +0 −4 test/collections.js
  18. +39 −65 test/color.js
  19. +109 −0 test/common/bootstrap.js
  20. +5 −43 test/compass.js
  21. +22 −58 test/esc.js
  22. +0 −25 test/expander.js
  23. +0 −17 test/extended/animation.js
  24. +0 −14 test/extended/led.js
  25. +0 −16 test/extended/piezo.js
  26. +5 −5 test/extended/servo.js
  27. +0 −5 test/fn.js
  28. +10 −51 test/gps.js
  29. +13 −49 test/gyro.js
  30. +7 −38 test/hygrometer.js
  31. +34 −70 test/imu.js
  32. +14 −50 test/joystick.js
  33. +26 −50 test/keypad.js
  34. +57 −101 test/lcd.js
  35. +6 −28 test/led.js
  36. +49 −81 test/ledcontrol.js
  37. +56 −89 test/light.js
  38. +50 −84 test/motion.js
  39. +58 −84 test/motor.js
  40. +12 −48 test/piezo.js
  41. +16 −51 test/pin.js
  42. +0 −112 test/ping.js
  43. +0 −103 test/pir.js
  44. +121 −143 test/proximity.js
  45. +11 −46 test/reflectancearray.js
  46. +0 −22 test/relay.js
  47. +0 −7 test/repl.js
  48. +25 −63 test/sensor.js
  49. +0 −24 test/servo.js
  50. +0 −21 test/shiftregister.js
  51. +0 −302 test/sonar.js
  52. +26 −63 test/stepper.js
  53. +0 −22 test/switch.js
  54. +0 −21 test/thermometer.js
  55. +16 −31 test/wii.js
  56. +1 −22 test/within.js
View
@@ -21,6 +21,7 @@
"Radar": true,
"WeakMap": true,
"window": true,
- "copy": true
+ "copy": true,
+ "mocks": true
}
}
View
@@ -75,7 +75,7 @@ module.exports = function(grunt) {
},
nodeunit: {
tests: [
- "test/bootstrap/*.js",
+ "test/common/bootstrap.js",
"test/*.js"
]
},
@@ -149,7 +149,7 @@ module.exports = function(grunt) {
grunt.registerTask("nodeunit:just", "Run a single or limited set of tests specified by a target; usage: 'grunt nodeunit:just:test-file' or 'grunt nodeunit:just:{test-file-a,test-file-b}'", function(file) {
var config = [
- "test/bootstrap/*.js",
+ "test/common/bootstrap.js",
];
if (file) {
View
@@ -71,9 +71,7 @@ var Serial = {
var serialport;
- if (IS_TEST_MODE) {
- serialport = require("mock-firmata").SerialPort;
- } else if (parseFloat(process.versions.nw) >= 0.13) {
+ if (parseFloat(process.versions.nw) >= 0.13) {
serialport = require("browser-serialport");
} else {
serialport = require("serialport");
View
@@ -0,0 +1,87 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": false,
+ "newcap": false,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "boss": true,
+ "eqnull": true,
+ "node": true,
+ "strict": false,
+ "esnext": true,
+ "quotmark": "double",
+ "unused": true,
+ "globals": {
+ "exports": true,
+ "document": true,
+ "$": true,
+ "Radar": true,
+ "WeakMap": true,
+ "window": true,
+ "copy": true,
+ "sinon": true,
+ "newBoard": true,
+ "mocks": true,
+ "Firmata": true,
+ "MockFirmata": true,
+ "SerialPort": true,
+ "MockSerialPort": true,
+ "five": true,
+ "Accelerometer": true,
+ "Animation": true,
+ "Altimeter": true,
+ "Barometer": true,
+ "Board": true,
+ "Boards": true,
+ "Button": true,
+ "Buttons": true,
+ "Color": true,
+ "Compass": true,
+ "Distance": true,
+ "ESC": true,
+ "ESCs": true,
+ "Expander": true,
+ "Fn": true,
+ "GPS": true,
+ "Gripper": true,
+ "Gyro": true,
+ "Hygrometer": true,
+ "IMU": true,
+ "IR": true,
+ "Keypad": true,
+ "LCD": true,
+ "Led": true,
+ "Leds": true,
+ "LedControl": true,
+ "Light": true,
+ "Joystick": true,
+ "Motion": true,
+ "Motor": true,
+ "Nodebot": true,
+ "Piezo": true,
+ "Ping": true,
+ "Pir": true,
+ "Pin": true,
+ "Proximity": true,
+ "Relay": true,
+ "Repl": true,
+ "Sensor": true,
+ "Sensors": true,
+ "Servo": true,
+ "Servos": true,
+ "ShiftRegister": true,
+ "ShiftRegisters": true,
+ "Sonar": true,
+ "Stepper": true,
+ "Switch": true,
+ "Thermometer": true,
+ "Virtual": true,
+ "Wii": true,
+ "Collection": true,
+ "Emitter": true,
+ "within": true
+ }
+}
Oops, something went wrong.

0 comments on commit 624dc7a

Please sign in to comment.