Skip to content

Instantly share code, notes, and snippets.

@npm1
Created August 30, 2017 16:55
Show Gist options
  • Save npm1/089f864992955d2f17ffc1a3799a47a3 to your computer and use it in GitHub Desktop.
Save npm1/089f864992955d2f17ffc1a3799a47a3 to your computer and use it in GitHub Desktop.
This is a testharness.js-based test.
PASS First loop: checking entries after removing "". There should be 2 entries.
PASS First loop: checking entries after removing "". Entries in entrylist should be in order.
PASS First loop: checking entries after removing "". Entry_list 0. Entry "1" should be one that we have set.
PASS First loop: checking entries after removing "". Entry_list 0. entryType should be "mark".
PASS First loop: checking entries after removing "". Entry_list 0. startTime should greater than 0.
PASS First loop: checking entries after removing "". Entry_list 0. duration of mark should be 0.
PASS First loop: checking entries after removing "". Entry_list 1. Entry "abc" should be one that we have set.
PASS First loop: checking entries after removing "". Entry_list 1. entryType should be "mark".
PASS First loop: checking entries after removing "". Entry_list 1. startTime should greater than 0.
PASS First loop: checking entries after removing "". Entry_list 1. duration of mark should be 0.
PASS First loop: marks that we cleared for "" should not exist anymore.
PASS First loop: checking entries after removing "1". There should be 1 entries.
PASS First loop: checking entries after removing "1". Entries in entrylist should be in order.
PASS First loop: checking entries after removing "1". Entry_list 0. Entry "abc" should be one that we have set.
PASS First loop: checking entries after removing "1". Entry_list 0. entryType should be "mark".
PASS First loop: checking entries after removing "1". Entry_list 0. startTime should greater than 0.
PASS First loop: checking entries after removing "1". Entry_list 0. duration of mark should be 0.
PASS First loop: marks that we cleared for "1" should not exist anymore.
PASS First loop: checking entries after removing "abc". There should be 0 entries.
PASS First loop: checking entries after removing "abc". Entries in entrylist should be in order.
PASS First loop: marks that we cleared for "abc" should not exist anymore.
PASS No marks should exist after we clear all.
PASS Second loop: checking entries after removing "". There should be 4 entries.
PASS Second loop: checking entries after removing "". Entries in entrylist should be in order.
PASS Second loop: checking entries after removing "". Entry_list 0. Entry "1" should be one that we have set.
PASS Second loop: checking entries after removing "". Entry_list 0. entryType should be "mark".
PASS Second loop: checking entries after removing "". Entry_list 0. startTime should greater than 0.
PASS Second loop: checking entries after removing "". Entry_list 0. duration of mark should be 0.
PASS Second loop: checking entries after removing "". Entry_list 1. Entry "abc" should be one that we have set.
PASS Second loop: checking entries after removing "". Entry_list 1. entryType should be "mark".
PASS Second loop: checking entries after removing "". Entry_list 1. startTime should greater than 0.
PASS Second loop: checking entries after removing "". Entry_list 1. duration of mark should be 0.
PASS Second loop: checking entries after removing "". Entry_list 2. Entry "1" should be one that we have set.
PASS Second loop: checking entries after removing "". Entry_list 2. entryType should be "mark".
PASS Second loop: checking entries after removing "". Entry_list 2. startTime should greater than 0.
PASS Second loop: checking entries after removing "". Entry_list 2. duration of mark should be 0.
PASS Second loop: checking entries after removing "". Entry_list 3. Entry "abc" should be one that we have set.
PASS Second loop: checking entries after removing "". Entry_list 3. entryType should be "mark".
PASS Second loop: checking entries after removing "". Entry_list 3. startTime should greater than 0.
PASS Second loop: checking entries after removing "". Entry_list 3. duration of mark should be 0.
PASS Second loop: marks that we cleared for "" should not exist anymore.
PASS Second loop: checking entries after removing "1". There should be 2 entries.
PASS Second loop: checking entries after removing "1". Entries in entrylist should be in order.
PASS Second loop: checking entries after removing "1". Entry_list 0. Entry "abc" should be one that we have set.
PASS Second loop: checking entries after removing "1". Entry_list 0. entryType should be "mark".
PASS Second loop: checking entries after removing "1". Entry_list 0. startTime should greater than 0.
PASS Second loop: checking entries after removing "1". Entry_list 0. duration of mark should be 0.
PASS Second loop: checking entries after removing "1". Entry_list 1. Entry "abc" should be one that we have set.
PASS Second loop: checking entries after removing "1". Entry_list 1. entryType should be "mark".
PASS Second loop: checking entries after removing "1". Entry_list 1. startTime should greater than 0.
PASS Second loop: checking entries after removing "1". Entry_list 1. duration of mark should be 0.
PASS Second loop: marks that we cleared for "1" should not exist anymore.
PASS Second loop: checking entries after removing "abc". There should be 0 entries.
PASS Second loop: checking entries after removing "abc". Entries in entrylist should be in order.
PASS Second loop: marks that we cleared for "abc" should not exist anymore.
PASS Nothing should happen if we clear a non-exist mark.
PASS No marks should exist when we clear all.
Harness: the test ran to completion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment