-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93b85a6
commit 40426d8
Showing
23 changed files
with
396 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,7 @@ platforms/ | |
plugins/ | ||
typings/ | ||
www/* | ||
!www/.gitkeep | ||
!www/.gitkeep | ||
.tmp | ||
coverage | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extension": [ | ||
".js", ".jsx", ".ts", ".tsx" | ||
], | ||
"reporter": [ | ||
"html", | ||
"text-summary" | ||
], | ||
"cache": true, | ||
"sourceMap": false, | ||
"instrument": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,17 +45,6 @@ | |
<platform name="ios"> | ||
<preference name="Orientation" value="all" /> | ||
</platform> | ||
<plugin name="cordova-plugin-device" spec="1.1.0" /> | ||
<plugin name="cordova-plugin-network-information" spec="1.1.0" /> | ||
<plugin name="cordova-plugin-globalization" spec="1.0.2" /> | ||
<plugin name="cordova-plugin-whitelist" spec="1.2.0" /> | ||
<plugin name="phonegap-plugin-mobile-accessibility" spec="1.0.5" /> | ||
<plugin name="ionic-plugin-keyboard" spec="1.0.8" /> | ||
<plugin name="cordova-sqlite-ext" spec="0.8.0" /> | ||
<plugin name="cordova-plugin-splashscreen" spec="2.1.0" /> | ||
<plugin name="cordova-plugin-statusbar" spec="1.0.1" /> | ||
<plugin name="cordova-plugin-inappbrowser" spec="1.1.1" /> | ||
<plugin name="cordova-plugin-safariviewcontroller" spec="1.2.0" /> | ||
<icon height="60" platform="ios" src="res/icon/ios/icon-60.png" width="60" /> | ||
<icon height="120" platform="ios" src="res/icon/ios/[email protected]" width="120" /> | ||
<icon height="180" platform="ios" src="res/icon/ios/[email protected]" width="180" /> | ||
|
@@ -105,13 +94,24 @@ | |
<allow-intent href="itms:*" /> | ||
<allow-intent href="itms-apps:*" /> | ||
</platform> | ||
<engine name="ios" spec="~4.3.1" /> | ||
<engine name="android" spec="~6.1.2" /> | ||
<plugin name="cordova-plugin-wkwebview-engine" spec="~1.1.2" /> | ||
<preference name="AlternateContentSrc" value="undefined" /> | ||
<plugin name="cordova-labs-local-webserver" spec="git://github.com/apache/cordova-plugins#local-webserver" /> | ||
<plugin name="cordova-plugin-webpack-transpiler" spec="~0.2.3"> | ||
<engine name="android" spec="~6.1.2" /> | ||
<engine name="browser" spec="~4.1.0" /> | ||
<engine name="ios" spec="~4.3.1" /> | ||
<plugin name="cordova-labs-local-webserver" spec="git://github.com/apache/cordova-plugins.git#local-webserver" /> | ||
<plugin name="cordova-plugin-device" spec="1.1.0" /> | ||
<plugin name="cordova-plugin-globalization" spec="1.0.2" /> | ||
<plugin name="cordova-plugin-inappbrowser" spec="1.1.1" /> | ||
<plugin name="cordova-plugin-network-information" spec="1.1.0" /> | ||
<plugin name="cordova-plugin-safariviewcontroller" spec="1.2.0" /> | ||
<plugin name="cordova-plugin-splashscreen" spec="2.1.0" /> | ||
<plugin name="cordova-plugin-statusbar" spec="1.0.1" /> | ||
<plugin name="cordova-plugin-webpack-transpiler" spec="~0.3.1"> | ||
<variable name="CONFIG" value="typescript" /> | ||
</plugin> | ||
<engine name="browser" spec="~4.1.0" /> | ||
<plugin name="cordova-plugin-whitelist" spec="1.2.0" /> | ||
<plugin name="cordova-plugin-wkwebview-engine" spec="~1.1.2" /> | ||
<plugin name="cordova-sqlite-ext" spec="0.8.0" /> | ||
<plugin name="ionic-plugin-keyboard" spec="1.0.8" /> | ||
<plugin name="phonegap-plugin-mobile-accessibility" spec="1.0.5" /> | ||
</widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--webpack-config ./webpack.config-test.js | ||
--require source-map-support/register | ||
--full-trace | ||
test/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/* | ||
* Logology testing suite | ||
* | ||
* | ||
* This suite tests the basic features of Logology. Don't assume that this test suite | ||
* is in any way complete; as bugs are discovered, new tests will be added. | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* http://www.photokandy.com/books/mastering-phonegap | ||
* | ||
* MIT LICENSED | ||
* | ||
* | ||
* Copyright (c) 2016 Packt Publishing | ||
* Portions Copyright (c) 2016 Kerri Shotts (photoKandy Studios LLC) | ||
* Portions Copyright various third parties where noted. | ||
* | ||
* | ||
* 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, | ||
|
@@ -32,18 +32,18 @@ | |
"use strict"; | ||
|
||
let should = require("./helpers/setup").should; | ||
import Definition from "../src/www/js/app/models/Definition"; | ||
import Definition from "../www.src/es/app/models/Definition"; | ||
|
||
describe("Definition Tests", () => { | ||
it("should be able to create a new definition", () => { | ||
let d = new Definition({wordNetRef:1, | ||
let d = new Definition({wordNetRef:1, | ||
lemmas: ["apple"], | ||
partOfSpeech: "n", | ||
gloss: "A tasty fruit"}); | ||
return d.should.exist; | ||
}) | ||
it("should be able to create a new noun", () => { | ||
let d = new Definition({wordNetRef:1, | ||
let d = new Definition({wordNetRef:1, | ||
lemmas: ["apple"], | ||
partOfSpeech: "n", | ||
gloss: "A tasty fruit"}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/* | ||
* Logology testing suite | ||
* | ||
* | ||
* This suite tests the basic features of Logology. Don't assume that this test suite | ||
* is in any way complete; as bugs are discovered, new tests will be added. | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* http://www.photokandy.com/books/mastering-phonegap | ||
* | ||
* MIT LICENSED | ||
* | ||
* | ||
* Copyright (c) 2016 Packt Publishing | ||
* Portions Copyright (c) 2016 Kerri Shotts (photoKandy Studios LLC) | ||
* Portions Copyright various third parties where noted. | ||
* | ||
* | ||
* 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, | ||
|
@@ -33,8 +33,8 @@ | |
"use strict"; | ||
|
||
let should = require("./helpers/setup").should; | ||
import Dictionary from "../src/www/js/app/models/Dictionary"; | ||
import Definition from "../src/www/js/app/models/Definition"; | ||
import Dictionary from "../www.src/es/app/models/Dictionary"; | ||
import Definition from "../www.src/es/app/models/Definition"; | ||
|
||
describe("Dictionary Tests", () => { | ||
|
||
|
@@ -45,14 +45,14 @@ describe("Dictionary Tests", () => { | |
return dictionary.should.exist; | ||
}); | ||
}); | ||
|
||
describe ("#Loaded", () => { | ||
it("should be able to set itself as loaded", () => { | ||
dictionary.loaded(); | ||
return dictionary.isLoaded.should.be.true; | ||
}) | ||
}) | ||
|
||
describe ("#Empty", () => { | ||
it("should return an empty sorted index", () => { | ||
return dictionary.sortedIndex.should.have.lengthOf(0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/* | ||
* Logology testing suite | ||
* | ||
* | ||
* This suite tests the basic features of Logology. Don't assume that this test suite | ||
* is in any way complete; as bugs are discovered, new tests will be added. | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* http://www.photokandy.com/books/mastering-phonegap | ||
* | ||
* MIT LICENSED | ||
* | ||
* | ||
* Copyright (c) 2016 Packt Publishing | ||
* Portions Copyright (c) 2016 Kerri Shotts (photoKandy Studios LLC) | ||
* Portions Copyright various third parties where noted. | ||
* | ||
* | ||
* 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, | ||
|
@@ -31,21 +31,23 @@ | |
|
||
"use strict"; | ||
let should = require("./helpers/setup").should; | ||
import Favorites from "../src/www/js/app/models/Favorites"; | ||
import Favorites from "../www.src/es/app/models/Favorites"; | ||
import {createIndexedDBKVStore} from "../www.src/es/app/lib/IndexedDBKVStore"; | ||
let indexedDB = require("fake-indexeddb"); | ||
|
||
describe("Favorites", () => { | ||
|
||
describe("#Create", () => { | ||
it("should be able to create a new Favorites object", () => { | ||
let favorites = new Favorites(); | ||
let favorites = new Favorites({adapter:createIndexedDBKVStore({indexedDB})}); | ||
return favorites.should.exist; | ||
}); | ||
}); | ||
|
||
describe("#Manage", () => { | ||
let favorites = {}; | ||
it ("should report a new word as not a favorite", () => { | ||
favorites = new Favorites(); | ||
favorites = new Favorites({adapter:createIndexedDBKVStore({indexedDB})}); | ||
favorites.isWordAFavorite("mumble").should.become(false); | ||
}); | ||
it ("should save a word as a favorite", () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/* | ||
* Logology testing suite | ||
* | ||
* | ||
* This suite tests the basic features of Logology. Don't assume that this test suite | ||
* is in any way complete; as bugs are discovered, new tests will be added. | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* | ||
* Author: Kerri Shotts <[email protected]> | ||
* http://www.photokandy.com/books/mastering-phonegap | ||
* | ||
* MIT LICENSED | ||
* | ||
* | ||
* Copyright (c) 2016 Packt Publishing | ||
* Portions Copyright (c) 2016 Kerri Shotts (photoKandy Studios LLC) | ||
* Portions Copyright various third parties where noted. | ||
* | ||
* | ||
* 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, | ||
|
@@ -51,15 +51,15 @@ else { | |
} | ||
let should = require("./helpers/setup").should; | ||
|
||
import {createKVStore} from "../src/www/js/app/lib/KVStore"; | ||
import {createLocalStorageKVStore} from "../src/www/js/app/lib/LocalStorageKVStore"; | ||
import {createIndexedDBKVStore} from "../src/www/js/app/lib/IndexedDBKVStore"; | ||
import {createWebSQLKVStore} from "../src/www/js/app/lib/WebSQLKVStore"; | ||
import {createKVStore} from "../www.src/es/app/lib/KVStore"; | ||
import {createLocalStorageKVStore} from "../www.src/es/app/lib/LocalStorageKVStore"; | ||
import {createIndexedDBKVStore} from "../www.src/es/app/lib/IndexedDBKVStore"; | ||
import {createWebSQLKVStore} from "../www.src/es/app/lib/WebSQLKVStore"; | ||
|
||
describe ("KVStore", () => { | ||
[["localStorage", createLocalStorageKVStore, "localStorage", localStorage], | ||
["IndexedDB", createIndexedDBKVStore, "indexedDB", indexedDB], | ||
["WebSQL", createWebSQLKVStore, "openDatabase", openDatabase] | ||
//["WebSQL", createWebSQLKVStore, "openDatabase", openDatabase] | ||
].forEach( ([adapterName, adapterFn, mockProperty, mock]) => { | ||
describe ("Using " + adapterName, () => { | ||
if (mock) { | ||
|
Oops, something went wrong.