Skip to content

Commit

Permalink
release(dom): 17.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
staltz committed May 29, 2017
1 parent b5876fb commit 91ce870
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
18 changes: 6 additions & 12 deletions docs/api/dom.html
Expand Up @@ -112,28 +112,22 @@

A factory function to create mocked DOMSource objects, for testing purposes.

Takes a `streamAdapter` and a `mockConfig` object as arguments, and returns
Takes a `mockConfig` object as argument, and returns
a DOMSource that can be given to any Cycle.js app that expects a DOMSource in
the sources, for testing.

The `streamAdapter` parameter is a package such as `@cycle/xstream-adapter`,
`@cycle/rxjs-adapter`, etc. Import it as `import a from '@cycle/rx-adapter`,
then provide it to `mockDOMSource`. This is important so the DOMSource created
knows which stream library should it use to export its streams when you call
`DOMSource.events()` for instance.

The `mockConfig` parameter is an object specifying selectors, eventTypes and
their streams. Example:

```js
const domSource = mockDOMSource(RxAdapter, {
const domSource = mockDOMSource({
'.foo': {
'click': Rx.Observable.of({target: {}}),
'mouseover': Rx.Observable.of({target: {}}),
'click': xs.of({target: {}}),
'mouseover': xs.of({target: {}}),
},
'.bar': {
'scroll': Rx.Observable.of({target: {}}),
elements: Rx.Observable.of({tagName: 'div'}),
'scroll': xs.of({target: {}}),
elements: xs.of({tagName: 'div'}),
}
});

Expand Down
10 changes: 10 additions & 0 deletions dom/CHANGELOG.md
@@ -1,3 +1,13 @@
<a name="17.4.0"></a>
# 17.4.0 (2017-05-29)


### Bug Fixes

* **dom:** update to snabbdom 0.6.9 ([22d5cf0](https://github.com/cyclejs/cyclejs/commit/22d5cf0)), closes [#612](https://github.com/cyclejs/cyclejs/issues/612)



<a name="17.3.0"></a>
# 17.3.0 (2017-05-16)

Expand Down
2 changes: 1 addition & 1 deletion dom/package.json
@@ -1,6 +1,6 @@
{
"name": "@cycle/dom",
"version": "17.3.0",
"version": "17.4.0",
"description": "The standard DOM Driver for Cycle.js, based on Snabbdom",
"license": "MIT",
"homepage": "https://cycle.js.org",
Expand Down

0 comments on commit 91ce870

Please sign in to comment.