Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2016-01-27 08:40:30 +0300
committerXhmikosR <xhmikosr@gmail.com>2016-01-27 08:40:30 +0300
commit086702721ff36b908a7fc7b8f61e6f5e1d013aeb (patch)
treebea1f4d65dd7ece1254083ead34dd0b41d7f33d0 /js/tests/commonSpec.js
parent8a32a9aa2da629fcff645f2eba67df7ed25697fd (diff)
parentc95927b11ea0b2c13ce4dab95118bb292a068f33 (diff)
Merge pull request #774 from Johann-S/unit_test
Add unit test to Ratchet
Diffstat (limited to 'js/tests/commonSpec.js')
-rwxr-xr-xjs/tests/commonSpec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/tests/commonSpec.js b/js/tests/commonSpec.js
new file mode 100755
index 0000000..ccc19f1
--- /dev/null
+++ b/js/tests/commonSpec.js
@@ -0,0 +1,20 @@
+describe('Common', function () {
+ it('RATCHET namespace is defined', function () {
+ expect(typeof RATCHET !== 'undefined').toBe(true);
+ });
+
+ it('window.CustomEvent exists', function () {
+ expect(typeof window.CustomEvent !== 'undefined').toBe(true);
+ });
+
+ it('RATCHET.getBrowserCapabilities returns an object', function () {
+ var result = RATCHET.getBrowserCapabilities;
+ expect(typeof result === 'object').toBe(true);
+ });
+
+ it('RATCHET.getTransitionEnd returns string', function () {
+ var result = RATCHET.getTransitionEnd;
+ expect(typeof result === 'string').toBe(true);
+ expect(result.length > 0).toBe(true);
+ });
+});