Skip to content

Commit

Permalink
Merge pull request #18 from Antontelesh/bugfix
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
Antontelesh committed Apr 11, 2016
2 parents 762a950 + abf5db9 commit 53a997b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# CHANGELOG

## pending

* Fixed package author email (#16)
* Fixed docs (#17)

## 3.0.1

* Fixed docs (issue #13)
* Fixed docs (#13)

## 3.0.0

Expand All @@ -22,7 +27,7 @@ Here is the full list of API changes:
This lifecycle hook can be used to remove all event listeners registered in a component.
* `App#model` now accepts not an actual data object, but an instance of `Model`.
`Model` is another factory exported from `athletic`.
It's intended to being called without the `new` keyword.
It's intended to be called without the `new` keyword.
You can pass your data to the factory function when creating an instance of `Model`:

```typescript
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ Example:
import {App, Model} from 'athletic';

var model = Model({first_name: 'John', last_name: 'Doe'});
var app = new App();

app.model(model);
App().model(model);
```

This method returns `App` instance itself to support method chaining.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"declarative",
"component"
],
"author": "Anton Telesh <a.telesh@smcs.com.ua>",
"author": "Anton Telesh <telesh91@gmail.com>",
"license": "MIT",
"dependencies": {
"lodash": "^4.6.1"
Expand Down
13 changes: 13 additions & 0 deletions test/Model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,18 @@ test('Model', t => {
t.end();
});

t.test('getState()', t => {

let model = Model({prop: 'value'});

t.deepEqual(model.getState(), {prop: 'value'});

model.set('prop', 'value1');

t.deepEqual(model.getState(), {prop: 'value1'});

t.end();
});

t.end();
});

0 comments on commit 53a997b

Please sign in to comment.