bootprint-unit-testing
Unit-testing-tools for bootprint-projects
Installation
npm install bootprint-unit-testing
Usage
Consider a bootprint-module that uses the following Handlebarse-template as index.html.hbs
<body><p>name: {{name}}</p></body>
A test can be written like this:
/*! * bootprint-unit-testing <https://github.com/bootprint/bootprint-unit-testing> * * Copyright (c) 2017 Nils Knappmeier. * Released under the MIT license. */ /* eslint-env mocha */ 'use strict' const expect = expectconst core = __dirname
The test will run bootprint with the given module and verify the generated HTML using the cheerio library.
Trace and clarify activated
The bootprint-unit-testing module
✓ The output should contain the name in a <p>-tag
1 passing (171ms)
License
bootprint-unit-testing
is published under the MIT-license.
See LICENSE.md for details.
Release-Notes
For release notes, see CHANGELOG.md
Contributing guidelines
See CONTRIBUTING.md.