Skip to content

Commit

Permalink
Merge branch 'master' of github.com:testing-library/svelte-testing-li…
Browse files Browse the repository at this point in the history
…brary
  • Loading branch information
Ben Monro committed May 9, 2019
2 parents 959c535 + 8c5e369 commit 4238f58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Links:
[build]: https://travis-ci.org/testing-library/svelte-testing-library
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/svelte-testing-library.svg?style=flat-square
[coverage]: https://codecov.io/github/testing-library/svelte-testing-library
[version-badge]: https://img.shields.io/npm/v/svelte-testing-library.svg?style=flat-square
[version-badge]: https://img.shields.io/npm/v/svlt-testing-library.svg?style=flat-square
[package]: https://www.npmjs.com/package/svelte-testing-library
[downloads-badge]: https://img.shields.io/npm/dm/svelte-testing-library.svg?style=flat-square
[npmtrends]: http://www.npmtrends.com/svelte-testing-library
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import {getQueriesForElement, prettyDOM} from 'dom-testing-library'

export * from 'dom-testing-library'
const mountedContainers = new Set()
export const render = (Component, {target = document.createElement('div'), ...options} = {}) => {
document.body.appendChild(target)
export const render = (Component, {target, ...options} = {}) => {
if (!target) {
target = document.body.appendChild(document.createElement('div'))
}

const component = new Component({
...options,
Expand Down

0 comments on commit 4238f58

Please sign in to comment.