diff --git a/Gruntfile.js b/Gruntfile.js index 2c831afa..c2189e82 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,7 +15,12 @@ module.exports = function (grunt) { all : { src: ['bootbox.js', 'dist/bootbox.locales.js'], dest: 'dist/bootbox.all.js' - } + }, + + license : { + src: ['LICENSE.md'], + dest: 'dist/LICENSE.md' + }, }, jsbeautifier : { diff --git a/dist/LICENSE.md b/dist/LICENSE.md new file mode 100644 index 00000000..1e7afa23 --- /dev/null +++ b/dist/LICENSE.md @@ -0,0 +1,23 @@ +# License + +(The MIT License) + +Copyright (C) 2011-2024 by Nick Payne + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE diff --git a/tests/units.html b/tests/units.html index 0253317e..504e9612 100644 --- a/tests/units.html +++ b/tests/units.html @@ -11,13 +11,13 @@

Unit test results, Grouped

Browser: Chrome Headless 128.0.0.0 (Windows 10)
-
Timestamp: 11/7/2024, 6:28:22 PM
+
Timestamp: 11/7/2024, 6:37:38 PM

648 tests / 0 errors / 0 failures / 0 skipped / - runtime: 0.063s + runtime: 0.067s

@@ -29,7 +29,7 @@

basic usage tests » with no arguments

throws an error regarding argument length

-
Passed in 0s
+
Passed in 0.001s
@@ -47,7 +47,7 @@

basic usage tests » with one argument » where the argument is a string

shows the expected body copy

-
Passed in 0.001s
+
Passed in 0s
@@ -56,7 +56,7 @@

basic usage tests » with one argument » where the argument is a string

shows an OK button

-
Passed in 0.001s
+
Passed in 0.002s
@@ -101,7 +101,7 @@

basic usage tests » with one argument » where the argument is a string

applies the correct aria-hidden attribute to the close button

-
Passed in 0s
+
Passed in 0.001s
@@ -146,7 +146,7 @@

callback tests » with no callback » when dismissing the dialog by clicking OK

should hide the modal

-
Passed in 0.001s
+
Passed in 0s
@@ -272,7 +272,7 @@

callback tests » with a callback which returns false » when dismissing the dialog by clicking OK

should not hide the modal

-
Passed in 0.001s
+
Passed in 0s
@@ -338,7 +338,7 @@

is attached to the window object

-
Passed in 0s
+
Passed in 0.001s
@@ -491,7 +491,7 @@

adding and removing locales » bootbox.removeLocale

falls back to the default CANCEL translation

-
Passed in 0s
+
Passed in 0.001s
@@ -572,7 +572,7 @@

resuable: false dialog » hidden.bs.modal » when triggered with `reusable: false`

removes the dialog

-
Passed in 0s
+
Passed in 0.001s
@@ -593,7 +593,7 @@

basic usage tests » with one argument » where the argument is not an object

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -602,7 +602,7 @@

basic usage tests » with one argument » where the argument is an object » with a message property

throws an error requiring a callback

-
Passed in 0s
+
Passed in 0.001s
@@ -638,7 +638,7 @@

basic usage tests » with one argument » where the argument is an object » with a message and a callback

creates a dialog object

-
Passed in 0s
+
Passed in 0.001s
@@ -656,7 +656,7 @@

basic usage tests » with one argument » where the argument is an object » with a message and a callback

adds the correct button classes

-
Passed in 0.001s
+
Passed in 0s
@@ -683,7 +683,7 @@

basic usage tests » with two arguments » where the second argument is a function

creates a dialog object

-
Passed in 0s
+
Passed in 0.001s
@@ -701,7 +701,7 @@

basic usage tests » with two arguments » where the second argument is a function

adds the correct button labels

-
Passed in 0s
+
Passed in 0.001s
@@ -728,7 +728,7 @@

configuration options tests » with a custom cancel button

adds the correct cancel button

-
Passed in 0.001s
+
Passed in 0s
@@ -773,7 +773,7 @@

callback tests » with a simple callback » when dismissing the dialog by clicking OK

with the correct value

-
Passed in 0s
+
Passed in 0.001s
@@ -818,7 +818,7 @@

callback tests » with a simple callback » when dismissing the dialog by clicking Cancel

should hide the modal

-
Passed in 0s
+
Passed in 0.001s
@@ -1037,7 +1037,7 @@

size » when set to extra-large

adds the extra-large class to the innerDialog

-
Passed in 0.001s
+
Passed in 0s
@@ -1046,7 +1046,7 @@

size » when set to xl

adds the extra-large class to the innerDialog

-
Passed in 0s
+
Passed in 0.001s
@@ -1091,7 +1091,7 @@

backdrop » when set to false

does not show a backdrop

-
Passed in 0s
+
Passed in 0.001s
@@ -1157,7 +1157,7 @@

invalid usage tests » with no arguments

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -1166,7 +1166,7 @@

invalid usage tests » with one argument » where the argument is not an object

throws an error

-
Passed in 0s
+
Passed in 0.001s
@@ -1202,7 +1202,7 @@

when creating a minimal dialog

adds the bootstrap modal class to the dialog

-
Passed in 0.001s
+
Passed in 0s
@@ -1247,7 +1247,7 @@

when creating a minimal dialog

does not have a footer

-
Passed in 0.001s
+
Passed in 0s
@@ -1454,7 +1454,7 @@

when creating a dialog with a button » when the button has no explicit label » when its value is not an object or function

throws an error

-
Passed in 0s
+
Passed in 0.001s
@@ -1490,7 +1490,7 @@

when creating a dialog with no backdrop

does not have a backdrop

-
Passed in 0s
+
Passed in 0.001s
@@ -1580,7 +1580,7 @@

when creating a dialog with an onEscape handler » with a callback which returns false » when triggering the escape keyup event

should not hide the modal

-
Passed in 0s
+
Passed in 0.001s
@@ -1637,7 +1637,7 @@

Invalid locale

shows the default OK translation

-
Passed in 0.001s
+
Passed in 0s
@@ -1718,7 +1718,7 @@

English

shows the correct OK translation

-
Passed in 0.001s
+
Passed in 0s
@@ -1772,7 +1772,7 @@

German

shows the correct OK translation

-
Passed in 0.001s
+
Passed in 0s
@@ -1808,7 +1808,7 @@

Spanish

shows the correct CANCEL translation

-
Passed in 0s
+
Passed in 0.001s
@@ -1880,7 +1880,7 @@

Portuguese (Brasil)

shows the correct OK translation

-
Passed in 0.001s
+
Passed in 0s
@@ -1988,7 +1988,7 @@

Italian

shows the correct OK translation

-
Passed in 0s
+
Passed in 0.001s
@@ -2051,7 +2051,7 @@

Danish

shows the correct CANCEL translation

-
Passed in 0s
+
Passed in 0.001s
@@ -2114,7 +2114,7 @@

Chinese » China

shows the correct CONFIRM translation

-
Passed in 0s
+
Passed in 0.001s
@@ -2132,7 +2132,7 @@

Norwegian

shows the correct CANCEL translation

-
Passed in 0.001s
+
Passed in 0s
@@ -2474,7 +2474,7 @@

Ukrainian

shows the correct OK translation

-
Passed in 0s
+
Passed in 0.001s
@@ -2528,7 +2528,7 @@

Slovenian

shows the correct OK translation

-
Passed in 0.001s
+
Passed in 0s
@@ -2573,7 +2573,7 @@

Slovak

shows the correct CONFIRM translation

-
Passed in 0.001s
+
Passed in 0s
@@ -2693,7 +2693,7 @@

basic usage tests » with one argument » where the argument is not an object

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -2702,7 +2702,7 @@

basic usage tests » with one argument » where the argument is an object » with a title property

throws an error requiring a callback

-
Passed in 0s
+
Passed in 0.001s
@@ -2729,7 +2729,7 @@

basic usage tests » with one argument » where the argument is an object » with a title and a callback

does not throw an error

-
Passed in 0.005s
+
Passed in 0.007s
@@ -2774,7 +2774,7 @@

basic usage tests » with two arguments » where the second argument is not a function

throws an error requiring a callback

-
Passed in 0s
+
Passed in 0.001s
@@ -2819,7 +2819,7 @@

basic usage tests » with two arguments » where the second argument is a function

adds the expected dialog title

-
Passed in 0.001s
+
Passed in 0s
@@ -2936,7 +2936,7 @@

configuration options tests » setting inputType text » without default value

has proper class

-
Passed in 0s
+
Passed in 0.001s
@@ -2945,7 +2945,7 @@

configuration options tests » setting inputType text » with default value

has correct default value

-
Passed in 0s
+
Passed in 0.001s
@@ -3026,7 +3026,7 @@

configuration options tests » setting inputType email » without default value

has proper class

-
Passed in 0s
+
Passed in 0.001s
@@ -3125,7 +3125,7 @@

configuration options tests » setting inputType select » with options in the wrong format

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -3134,7 +3134,7 @@

configuration options tests » setting inputType select » with a value but no text

throws an error

-
Passed in 0s
+
Passed in 0.001s
@@ -3233,7 +3233,7 @@

configuration options tests » setting inputType checkbox » without options

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -3287,7 +3287,7 @@

configuration options tests » setting inputType radio » with options in the wrong format

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -3305,7 +3305,7 @@

configuration options tests » setting inputType radio » with options

has proper class

-
Passed in 0s
+
Passed in 0.001s
@@ -3341,7 +3341,7 @@

configuration options tests » setting inputType date » without default value

has proper class

-
Passed in 0s
+
Passed in 0.001s
@@ -3422,7 +3422,7 @@

configuration options tests » setting inputType time » with min value

has correct min value

-
Passed in 0.001s
+
Passed in 0s
@@ -3440,7 +3440,7 @@

configuration options tests » setting inputType time » with step value

has correct step value

-
Passed in 0s
+
Passed in 0.001s
@@ -3458,7 +3458,7 @@

configuration options tests » setting inputType time » with an invalid max value

throws an error

-
Passed in 0.001s
+
Passed in 0s
@@ -3521,7 +3521,7 @@

configuration options tests » setting inputType number » with min int value

has correct min value

-
Passed in 0s
+
Passed in 0.001s
@@ -3530,7 +3530,7 @@

configuration options tests » setting inputType number » with min decimal value

has correct min value

-
Passed in 0.001s
+
Passed in 0s
@@ -3548,7 +3548,7 @@

configuration options tests » setting inputType number » with max decimal value

has correct max value

-
Passed in 0.001s
+
Passed in 0s
@@ -3575,7 +3575,7 @@

configuration options tests » setting inputType number » with an invalid min value

throws an error

-
Passed in 0s
+
Passed in 0.001s
@@ -3665,7 +3665,7 @@

configuration options tests » setting inputType range » with step value

has correct step value

-
Passed in 0.001s
+
Passed in 0s
@@ -3674,7 +3674,7 @@

configuration options tests » setting inputType range » with an invalid min value

throws an error

-
Passed in 0s
+
Passed in 0.001s
@@ -3737,7 +3737,7 @@

callback tests » with a simple callback » when entering no value in the text input » when dismissing the dialog by clicking OK

should hide the modal

-
Passed in 0s
+
Passed in 0.001s
@@ -3890,7 +3890,7 @@

callback tests » with a simple callback » when triggering the escape event

with the correct value

-
Passed in 0s
+
Passed in 0.001s
@@ -3962,7 +3962,7 @@

callback tests » with a callback which returns false » when entering no value in the text input » when dismissing the dialog by clicking OK

with the correct value

-
Passed in 0s
+
Passed in 0.001s
@@ -4052,7 +4052,7 @@

callback tests » with a callback which returns false » when triggering the escape event

should invoke the callback

-
Passed in 0.001s
+
Passed in 0s
@@ -4088,7 +4088,7 @@

callback tests » with a callback which returns false » when dismissing the dialog by clicking the close button

should invoke the callback

-
Passed in 0.001s
+
Passed in 0s
@@ -4106,7 +4106,7 @@

callback tests » with a callback which returns false » when dismissing the dialog by clicking the close button

with the correct value

-
Passed in 0.001s
+
Passed in 0s
@@ -4331,7 +4331,7 @@

callback tests » with required: true and default input type » when entering a value in the text input » when dismissing the dialog by clicking Cancel

should pass the dialog as "this"

-
Passed in 0.001s
+
Passed in 0s
@@ -4565,7 +4565,7 @@

callback tests » with required: true and `number` input type » when entering no value in the text input » when dismissing the dialog by clicking Cancel

should invoke the callback

-
Passed in 0.001s
+
Passed in 0s
@@ -4601,7 +4601,7 @@

callback tests » with required: true and `number` input type » when entering a value in the text input » when dismissing the dialog by clicking OK

should pass the dialog as "this"

-
Passed in 0s
+
Passed in 0.001s
@@ -4745,7 +4745,7 @@

callback tests » with required: true and `time` input type

populates the input with the required property

-
Passed in 0.001s
+
Passed in 0s
@@ -4853,7 +4853,7 @@

callback tests » with required: true and `textarea` input type » when entering no value in the text input » when dismissing the dialog by clicking OK

should not invoke the callback

-
Passed in 0.001s
+
Passed in 0s
@@ -4880,7 +4880,7 @@

callback tests » with required: true and `textarea` input type » when entering no value in the text input » when dismissing the dialog by clicking Cancel

with the correct value

-
Passed in 0.001s
+
Passed in 0s
@@ -4898,7 +4898,7 @@

callback tests » with required: true and `textarea` input type » when entering a value in the text input » when dismissing the dialog by clicking OK

should pass the dialog as "this"

-
Passed in 0s
+
Passed in 0.001s
@@ -4943,7 +4943,7 @@

callback tests » with inputType select » without a default value

has correct number values in list

-
Passed in 0.001s
+
Passed in 0s
@@ -5087,7 +5087,7 @@

callback tests » with inputType select » with required: true and option selected

specified option is selected

-
Passed in 0.001s
+
Passed in 0s
@@ -5105,7 +5105,7 @@

callback tests » with inputType select » with required: true and option selected » when dismissing the dialog by clicking OK

should pass the dialog as "this"

-
Passed in 0.001s
+
Passed in 0s
@@ -5240,7 +5240,7 @@

callback tests » with inputType email » without a default value » when dismissing the dialog by clicking OK

should pass the dialog as "this"

-
Passed in 0.001s
+
Passed in 0s
@@ -5258,7 +5258,7 @@

callback tests » with inputType email » without a default value » when dismissing the dialog by clicking OK

should hide the modal

-
Passed in 0.001s
+
Passed in 0s
@@ -5294,7 +5294,7 @@

callback tests » with inputType email » without a default value » when entering a value in the email input » when dismissing the dialog by clicking OK

should pass the dialog as "this"

-
Passed in 0s
+
Passed in 0.001s
@@ -5411,7 +5411,7 @@

callback tests » with inputType email » with required: true and a default value » when dismissing the dialog by clicking OK

should invoke the callback

-
Passed in 0s
+
Passed in 0.001s
@@ -5420,7 +5420,7 @@

callback tests » with inputType email » with required: true and a default value » when dismissing the dialog by clicking OK

with the correct value

-
Passed in 0.001s
+
Passed in 0s
@@ -5555,7 +5555,7 @@

callback tests » with input type checkbox » without a default value » when dismissing the dialog by clicking OK

with an undefined value

-
Passed in 0.001s
+
Passed in 0s
@@ -5609,7 +5609,7 @@

callback tests » with input type checkbox » with default value » one value checked » when dismissing the dialog by clicking OK

with the correct value

-
Passed in 0s
+
Passed in 0.001s
@@ -5627,7 +5627,7 @@

callback tests » with input type checkbox » with default value » one value checked » when dismissing the dialog by clicking Cancel

with the correct value

-
Passed in 0.001s
+
Passed in 0s
@@ -5762,7 +5762,7 @@

callback tests » with input type radio » without a default value » when dismissing the dialog by clicking OK

with the first option value

-
Passed in 0s
+
Passed in 0.001s
@@ -5798,7 +5798,7 @@

callback tests » with input type radio » with default value » one value checked

specified radio is checked

-
Passed in 0s
+
Passed in 0.001s