Skip to content

Instantly share code, notes, and snippets.

@thom4parisot
Last active December 25, 2015 01:59
Show Gist options
  • Select an option

  • Save thom4parisot/6899493 to your computer and use it in GitHub Desktop.

Select an option

Save thom4parisot/6899493 to your computer and use it in GitHub Desktop.
Tap reporter

The problem: Tap reporter notifies 32 tests hence with the dot one (any of them actually), 31 ones are reported.

Test suite location

$ > ./node_modules/.bin/mocha --ui tdd --reporter dot
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․

  31 tests complete (243 ms)

While

$ ./node_modules/.bin/mocha --ui tdd --reporter tap

1..31
ok 1 http://publicsuffix.org/list/test.txt NULL input
ok 2 http://publicsuffix.org/list/test.txt Mixed case
ok 3 http://publicsuffix.org/list/test.txt Leading dot
ok 4 http://publicsuffix.org/list/test.txt Unlisted TLD
ok 5 http://publicsuffix.org/list/test.txt TLD with only 1 rule
ok 6 http://publicsuffix.org/list/test.txt TLD with some 2-level rules
ok 7 http://publicsuffix.org/list/test.txt TLD with only 1 (wildcard) rule
ok 8 http://publicsuffix.org/list/test.txt More complex TLD
ok 9 http://publicsuffix.org/list/test.txt TLD with a wildcard rule and exceptions
ok 10 http://publicsuffix.org/list/test.txt US K12
ok 11 Public Suffix Rule constructor
ok 12 Public Suffix Rule getNormalXld()
ok 13 Public Suffix Rule getNormalPattern()
ok 14 Public Suffix Rule getWildcardPattern()
ok 15 Public Suffix Rule getExceptionPattern()
ok 16 Public Suffix Rule getPattern()
ok 17 tld.js Basics Rules are already loaded
ok 18 tld.js isValid() Good ones
ok 19 tld.js isValid() Invalid types
ok 20 tld.js isValid() Invalid notation
ok 21 tld.js isValid() Dot-less hostname
ok 22 tld.js getDomain() basic domains
ok 23 tld.js getDomain() composed 
ok 24 tld.js getDomain() subdomains
ok 25 tld.js tldExists existing TLD
ok 26 tld.js tldExists unexisting TLD
ok 27 tld.js tldExists they cannot be verified
ok 28 tld.js getSubdomain() simple TLD
ok 29 tld.js getSubdomain() weirdo syntax
ok 30 tld.js getSubdomain() TLD + SLD
ok 31 tld.js getSubdomain() wildcard
# tests 32
# pass 31
# fail 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment