UNPKG

html-entities-decode

Version:
39 lines (29 loc) 874 B
/* IMPORT */ import {describe} from 'ava-spec'; import decode from '../dist'; /* HTML ENTITIES DECODE */ describe ( 'decode', it => { it ( 'works', t => { const tests = [ ['&foo;', '&foo;'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], ['&', '&'], [':', ':'], [':', ':'], [':', ':'], [':', ':'], ['asdf & ÿ ü '', 'asdf & ÿ ü \''], ['&', '&'], ['Foo © bar 𝌆 baz ☃ qux', 'Foo © bar 𝌆 baz ☃ qux'] ]; tests.forEach ( ([ encoded, decoded ]) => t.is ( decode ( encoded ), decoded ) ); }); });