Coder Social home page Coder Social logo

sknuell / qunit-assert-html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamesmgreene/qunit-assert-html

0.0 2.0 0.0 502 KB

A QUnit plugin for assertion methods to compare two HTML strings for equality after a rigorous normalization process.

License: MIT License

qunit-assert-html's Introduction

Build Status

QUnit HTML assertion plugin

This plugin for QUnit adds htmlEqual and notHtmlEqual assertion methods to test that two HTML strings are equivalent (or not) after a rigorous normalization process.

Usage

assert.htmlEqual(actual, expected [, message]);
assert.notHtmlEqual(actual, expected [, message]);

Examples

test('Example unit test', function(assert) {
  assert.htmlEqual('<B TITLE=test>test</B>', '<b title="test">test</b>');
  assert.notHtmlEqual('<br />', '<hr />');
});

For more examples, refer to the unit tests.

Compatibility

  • Browsers: This plugin currently works in IE7+ (IE6 untested) but does not fully normalize certain CSS style properties (e.g. color values) in IE < 9. For a little more info, see QUnit PR #368.
  • Node.js: This plugin has not been tested in Node.js. However, it does require DOM support for iframes, so you would need to utilize jsdom, Cheerio, etc., to make it work at all.

Documentation

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 James M. Greene
Licensed under the MIT license.

qunit-assert-html's People

Contributors

jzaefferer avatar jeresig avatar krinkle avatar jamesmgreene avatar scottgonzalez avatar willmoffat avatar prathe avatar benjaminplee avatar gibson042 avatar rwaldron avatar leeoniya avatar erikvold avatar nv avatar rdworth avatar trevorparscal avatar wwalser avatar simonz avatar ryans avatar kof avatar mathiasbynens avatar mmchaney avatar kassens avatar gnarf avatar alexjeffburke avatar jitter avatar jniehus avatar keithamus avatar marc-portier avatar righi avatar mikesherov avatar

Watchers

Sebastian avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.