Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kellyselden/ember-text-test-helper
`text` test helper that collapses spaces and newlines
https://github.com/kellyselden/ember-text-test-helper
Last synced: 16 days ago
JSON representation
`text` test helper that collapses spaces and newlines
- Host: GitHub
- URL: https://github.com/kellyselden/ember-text-test-helper
- Owner: kellyselden
- License: mit
- Created: 2017-11-11T18:40:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T16:20:37.000Z (about 6 years ago)
- Last Synced: 2025-01-02T05:43:58.959Z (24 days ago)
- Language: JavaScript
- Size: 403 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-text-test-helper
==============================================================================[![Greenkeeper badge](https://badges.greenkeeper.io/kellyselden/ember-text-test-helper.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/ember-text-test-helper.svg)](https://badge.fury.io/js/ember-text-test-helper)
[![Build Status](https://travis-ci.org/kellyselden/ember-text-test-helper.svg?branch=master)](https://travis-ci.org/kellyselden/ember-text-test-helper)
[![Ember Version](https://img.shields.io/badge/ember-2.16%2B-brightgreen.svg)](https://www.emberjs.com/)`text` test helper that collapses spaces and newlines
Installation
------------------------------------------------------------------------------```
ember install ember-text-test-helper
```Usage
------------------------------------------------------------------------------```hbs
hello
there
``````js
import text from 'ember-text-test-helper';assert.equal(text('.whitespace'), 'hello there');
```You can select one or many elements and they will all be collapsed into a single string. The test helper takes an argument of a string selector, or already selected elements via `document.querySelector` and `document.querySelectorAll`.
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).