This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Q = require('q'); | |
// `condition` is a function that returns a boolean | |
// `body` is a function that returns a promise | |
// returns a promise for the completion of the loop | |
function promiseWhile(condition, body) { | |
var done = Q.defer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abandoned | |
able | |
absolute | |
adorable | |
adventurous | |
academic | |
acceptable | |
acclaimed | |
accomplished | |
accurate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
STRINGS | |
*/ | |
Assert.Equal(expectedString, actualString); | |
Assert.StartsWith(expectedString, stringToCheck); | |
Assert.EndsWith(expectedString, stringToCheck); | |
// Some can also take optional params | |
Assert.Equal(expectedString, actualString, ignoreCase: true); | |
Assert.StartsWith(expectedString, stringToCheck, StringComparison.OrdinalIgnoreCase); |