From dbe1558988f4570710021a48360817fadd7954f7 Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Thu, 29 Jan 2015 08:31:56 +0000 Subject: [PATCH 1/2] Make sure the _spec.js test is run during travis builds. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index da1de773..fa59c469 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -27,7 +27,7 @@ module.exports = function(grunt) { ui: 'bdd', reporter: 'spec' }, - all: { src: ['test/*/*_spec.js'] }, + all: { src: ['test/**/*_spec.js'] }, }, jshint: { options: { From e727581f28687a731915fcabf142c0fb01b57824 Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Thu, 29 Jan 2015 08:51:26 +0000 Subject: [PATCH 2/2] Add minimal forecastio tests. --- test/forecast/forecastio_spec.js | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 test/forecast/forecastio_spec.js diff --git a/test/forecast/forecastio_spec.js b/test/forecast/forecastio_spec.js new file mode 100644 index 00000000..90fad12c --- /dev/null +++ b/test/forecast/forecastio_spec.js @@ -0,0 +1,51 @@ +/** + * Copyright 2015 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ + +var should = require("should"); +var forecastNode = require("../../forecast/forecastio.js"); +var helper = require('../helper.js'); + +describe('forecastio nodes', function() { + + before(function(done) { + helper.startServer(done); + }); + + afterEach(function() { + helper.unload(); + }); + + describe('in node', function() { + it('can be loaded', function(done) { + helper.load(forecastNode, + [{id:"forecast", type:"forecastio in"}], function() { + var forecast = helper.getNode("forecast"); + forecast.should.have.property('id', 'forecast'); + done(); + }); + }); + }); + describe('query node', function() { + it('can be loaded', function(done) { + helper.load(forecastNode, + [{id:"forecast", type:"forecastio"}], function() { + var forecast = helper.getNode("forecast"); + forecast.should.have.property('id', 'forecast'); + done(); + }); + }); + }); +});