Skip to content

Commit

Permalink
Merge pull request #5 from turbolent/tests
Browse files Browse the repository at this point in the history
Return promises, add tests
  • Loading branch information
turbolent authored Mar 4, 2018
2 parents ca4ae94 + 92a6f4e commit e4b0300
Show file tree
Hide file tree
Showing 13 changed files with 2,107 additions and 235 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js

node_js:
- "7"

branches:
only:
- master

script: npm run buildProduction && npm test -- --runInBand

cache:
directories:
- "node_modules"
yarn: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The collection view supports transitions between different collections. As it is
of the underlying data itself, the changes have to be provided to the collection view explicitly,
in the form of the indices of the items which were removed, added, and moved, passed to the method:

**changeIndices(removed: _number[]_, added: _number[]_, moved: _Map.<number, number>_)**
**changeIndices(removed: _number[]_, added: _number[]_, moved: _Map.<number, number>_): Promise**

* **removed: _number[]_**

Expand Down Expand Up @@ -211,7 +211,7 @@ The `ListLayout` displays collection items in a list. All items have the same he
The collection view supports transitions between different layouts. Simply instantiate a new
layout, configure it, and call:

**updateLayout(newLayout: _CollectionViewLayout_)**
**updateLayout(newLayout: _CollectionViewLayout_): Promise**

For example, this allows changing the item size or direction of a [grid layout](#grid-layout).
The collection view properly maintains the position in the collection.
Expand Down
23 changes: 21 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "collection-view",
"version": "0.2.4",
"version": "0.2.5",
"license": "MIT",
"author": "Bastian Müller <[email protected]>",
"description": "UICollectionView for the web",
Expand All @@ -21,7 +21,9 @@
"scripts": {
"buildProduction": "webpack --env production --progress --profile --colors",
"prepublishOnly": "npm run buildProduction",
"lint": "tslint -c tslint.json 'src/**/*.ts'"
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"buildTestEnv": "webpack --context tests/env --config tests/env/webpack.config.js",
"test": "npm run buildTestEnv && jest"
},
"dependencies": {
"@types/bezier-easing": "2.0.x",
Expand All @@ -30,12 +32,29 @@
"lodash-es": "^4.17.4"
},
"devDependencies": {
"@types/jest": "^22.1.4",
"@types/puppeteer": "^1.0.1",
"babel-minify-webpack-plugin": "0.2.x",
"css-loader": "0.28.x",
"jest": "^22.4.2",
"puppeteer": "^1.1.1",
"style-loader": "0.19.x",
"ts-loader": "3.1.x",
"tslint": "5.8.x",
"typescript": "2.6.x",
"webpack": "3.8.x"
},
"jest": {
"moduleFileExtensions": [
"ts",
"js"
],
"transform": {
"^.+\\.ts$": "<rootDir>/tests/preprocessor.js"
},
"testMatch": [
"<rootDir>/tests/*.spec.ts"
],
"verbose": true
}
}
Loading

0 comments on commit e4b0300

Please sign in to comment.