Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix #18

Merged
merged 3 commits into from
Apr 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
});