Skip to content

Commit

Permalink
upgrade test jquery dep to 1.11.2, fix incorrect behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
makeusabrew committed Feb 22, 2015
1 parent 2266385 commit df1beb1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bootbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@
var groups = {};
inputOptions = options.inputOptions || [];

if (!$.isArray(inputOptions)) {
throw new Error("Please pass an array of input options");
}

if (!inputOptions.length) {
throw new Error("prompt with select requires options");
}
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var baseConfig = require("./karma-base.conf");

module.exports = baseConfig({
vendor: [
"tests/vendor/jquery-1.8.3.min.js",
"tests/vendor/jquery-1.11.2.min.js",
"tests/vendor/bootstrap-3.0.0.min.js"
]
});
2 changes: 1 addition & 1 deletion tests/prompt.test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ describe "bootbox.prompt", ->
@options.inputOptions = 'foo'

it "throws an error", ->
expect(@create).to.throw /given options in wrong format/
expect(@create).to.throw "Please pass an array of input options"

describe "with empty options", ->
beforeEach ->
Expand Down
7 changes: 7 additions & 0 deletions tests/vendor/bootstrap-3.3.2.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tests/vendor/jquery-1.11.2.min.js

Large diffs are not rendered by default.

0 comments on commit df1beb1

Please sign in to comment.