fixt

DOM test fixtures made as easy as they ought to be

Usage no npm install needed!

<script type="module">
  import fixt from 'https://cdn.skypack.dev/fixt';
</script>

README

Fixt

DOM test fixtures made as easy as they ought to be

Contents

Installation

$ yarn add fixt

Usage

import test from 'fixt';

describe('text()', () => {
  it('returns the text content of an element', async () => {
    await test(
      `
      <p>Hello world!</p>
      `,
      p => assert(text(p) === 'Hello world!')
    );
  });
});

License

Copyright © 2017-2018 Kasper Kronborg Isager. Licensed under the terms of the MIT license.