<commit_before>// Washington
// ==========
//
// > Little George sets a good example
//
// [ ![Codeship Status for xaviervia/washington](https://codeship.io/projects/b9498dd0-d7b0-0131-28b3-76d451bab93b/status)](https://codeship.io/projects/23932)
//
// Example library for TDD/BDD in Node.js.
// Very small. Much concise.
//
// - No assertions. Use [`assert`](http://nodejs.org/api/assert.html)
// - Stupidly simple asynchronous support.
// - Programmatically usable report (`washington.failing().length`)
//
// Installation
// ------------
//
// ```
// npm install washington
// ```
//
// Usage
// -----
//
// ### Basic example
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// example("2 + 2 should be 4", function () {
//   assert.equal(2 + 2, 4)
// })
//
// example.go()
// ```
//
// **Washington** runs the examples when the `go` method is called. By default,
// each successful, pending or failing example is printed to the console and
// the application ends with an exit code of `0` (success) if no example failed,
// or with the amount of failing examples (more than `0` means failure).
//
// > Note: I'm naming the module `example` even when the internal name is
// > `Washington` and I'll maintain this inconsistency accross the
// > documentation. This is because I strongly recommend using `example` to
// > make the purpose explicit. Please bear in mind that all of `Washington`
// > methods as stated in the documentation below are accessible through
// > `example` in these samples.
//
// ### Failing example
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// example("2 + 2 should be 5", function () {
//   assert.equal(2 + 2, 5)
// })
//
// example.go()
// ```
//
// ### Pending example
//
// > Oh yes, I missed having "pending". I'm looking at you,
// > [**Jasmine**](jasmine.github.io)
//
// ```javascript
// var example = require("washington")
//
// example("2 + 2 should be 4")
//
// example.go()
// ```
//
// ### Asynchronous example
//
// The main difference between synchronous and asynchronous examples is that
// asynchronous ones require to be told:
//
// - When is the example complete
// - What has been the error, if any
//
// This is achieved with the `done` function that the example function receives
// as argument.
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// example("2 + 2 will be 4", function (done) {
//   var result = 2 + 2
//   setTimeout(function () {
//     try {
//       assert.equal(result, 4)
//       done()
//     }
//     catch(error) {
//       done(error)
//     }
//   }, 100)
// })
//
// example.go()
// ```
//
// > **Important**: please note that if the example function receives
// > an argument, the example will be assumed to be asynchronous and will
// > timeout if the `done` function is never executed.
//
// ### Sequential example
//
// Asynchronous examples are run one at a time. Washington is designed to do
// this because many real life testing scenarios involve tests that interact
// with the same objects or servers concurrently and knowing the state of the
// server or object is significative to the example's completion. As of
// version 0.3.0 there is no alternative to this behavior.
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// var flag    = false
//
// example("will set the flag to true", function (done) {
//   setTimeout(function () {
//     assert.equal(flag, false)
//     flag = true
//     done()
//   }, 100)
// })
//
// example("the flag should be set to true", function (done) {
//   setTimeout(function () {
//     try {
//       assert.equal(flag, true)
//       done()
//     }
//
//     catch(error) {
//       done(error)
//     }
//   }, 100)
// })
//
// example.go()
// ```
//
// ### Dry run (no actual execution)
//
// Dry run lists the examples without actually running them.
//
// Useful for listing available examples.
//
// ```javascript
// var example = require("washington")
//
// example('Example', function () { 10 })
// example('Pending example')
// example('Failing example', function () { assert(1 === 2) })
// example('Async example', function () {})
//
// example.go({
//   dry: true
// })
//
// ```
//
// ### Use it as a command
//
// > You need to install washington as global for using the command line
// > tool. Do that by running `sudo npm install -g washington`
//
// **Washington** provides a command line tool for executing the specs in
// a [**code document**]. The procedure is like this: you start with a file
// that features some washington specs, for example `greet.js`
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// function greet(name) {
//   return "Hello " + name + "!"
// }
//
// example("Lets greet Paulie", function () {
//   assert.equal(greet("Paulie"), "Hello Paulie!")
// })
//
// module.exports = greet
// ```
//
// Then you call the command line tool with the file as argument
//
// ```
// washington greet.js
// ```
//
// The interesting thing about this (besides convenience) is that the
// code file is a fully functional module, requirable and production ready.
// Washington is added as a dependency but that is not really a concern
// in most applications. The file itself does not contain an invocation to
// actually run the examples, so the examples are just stored by Node unless
// you run them manually from another script.
//
// In essence, what the command line tool does is requiring **Washington**
// and the file and running Washington. You can also require the script
// `greet.js` in another script that itself has some Washington specs
// and run them all together from the command line. As a way of organizing
// the examples, it is really concise and convenient.<commit_msg>Explain dry run in documentation<commit_after>// Washington
// ==========
//
// > Little George sets a good example
//
// [ ![Codeship Status for xaviervia/washington](https://codeship.io/projects/b9498dd0-d7b0-0131-28b3-76d451bab93b/status)](https://codeship.io/projects/23932)
//
// Example library for TDD/BDD in Node.js.
// Very small. Much concise.
//
// - No assertions. Use [`assert`](http://nodejs.org/api/assert.html)
// - Stupidly simple asynchronous support.
// - Programmatically usable report (`washington.failing().length`)
//
// Installation
// ------------
//
// ```
// npm install washington
// ```
//
// Usage
// -----
//
// ### Basic example
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// example("2 + 2 should be 4", function () {
//   assert.equal(2 + 2, 4)
// })
//
// example.go()
// ```
//
// **Washington** runs the examples when the `go` method is called. By default,
// each successful, pending or failing example is printed to the console and
// the application ends with an exit code of `0` (success) if no example failed,
// or with the amount of failing examples (more than `0` means failure).
//
// > Note: I'm naming the module `example` even when the internal name is
// > `Washington` and I'll maintain this inconsistency accross the
// > documentation. This is because I strongly recommend using `example` to
// > make the purpose explicit. Please bear in mind that all of `Washington`
// > methods as stated in the documentation below are accessible through
// > `example` in these samples.
//
// ### Failing example
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// example("2 + 2 should be 5", function () {
//   assert.equal(2 + 2, 5)
// })
//
// example.go()
// ```
//
// ### Pending example
//
// > Oh yes, I missed having "pending". I'm looking at you,
// > [**Jasmine**](jasmine.github.io)
//
// ```javascript
// var example = require("washington")
//
// example("2 + 2 should be 4")
//
// example.go()
// ```
//
// ### Asynchronous example
//
// The main difference between synchronous and asynchronous examples is that
// asynchronous ones require to be told:
//
// - When is the example complete
// - What has been the error, if any
//
// This is achieved with the `done` function that the example function receives
// as argument.
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// example("2 + 2 will be 4", function (done) {
//   var result = 2 + 2
//   setTimeout(function () {
//     try {
//       assert.equal(result, 4)
//       done()
//     }
//     catch(error) {
//       done(error)
//     }
//   }, 100)
// })
//
// example.go()
// ```
//
// > **Important**: please note that if the example function receives
// > an argument, the example will be assumed to be asynchronous and will
// > timeout if the `done` function is never executed.
//
// ### Sequential example
//
// Asynchronous examples are run one at a time. Washington is designed to do
// this because many real life testing scenarios involve tests that interact
// with the same objects or servers concurrently and knowing the state of the
// server or object is significative to the example's completion. As of
// version 0.3.0 there is no alternative to this behavior.
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// var flag    = false
//
// example("will set the flag to true", function (done) {
//   setTimeout(function () {
//     assert.equal(flag, false)
//     flag = true
//     done()
//   }, 100)
// })
//
// example("the flag should be set to true", function (done) {
//   setTimeout(function () {
//     try {
//       assert.equal(flag, true)
//       done()
//     }
//
//     catch(error) {
//       done(error)
//     }
//   }, 100)
// })
//
// example.go()
// ```
//
// ### Dry run (no actual execution)
//
// Dry run lists the examples without actually running them.
//
// Useful for listing available examples.
//
// ```javascript
// var example = require("washington")
//
// example('Example', function () { 10 })
// example('Pending example')
// example('Failing example', function () { assert(1 === 2) })
// example('Async example', function () {})
//
// example.go({
//   dry: true
// })
//
// ```
//
// ### Use it as a command
//
// > You need to install washington as global for using the command line
// > tool. Do that by running `sudo npm install -g washington`
//
// **Washington** provides a command line tool for executing the specs in
// a [**code document**]. The procedure is like this: you start with a file
// that features some washington specs, for example `greet.js`
//
// ```javascript
// var example = require("washington")
// var assert  = require("assert")
//
// function greet(name) {
//   return "Hello " + name + "!"
// }
//
// example("Lets greet Paulie", function () {
//   assert.equal(greet("Paulie"), "Hello Paulie!")
// })
//
// module.exports = greet
// ```
//
// Then you call the command line tool with the file as argument
//
// ```
// washington greet.js
// ```
//
// You can also use the `--only`, `--start`, `--end` and `--match` filtering options:
//
// ```
// washington greet.js --start=2 --end=5 --match=WIP
// ```
//
// If you want to just list the available tests, do a dry run
//
// ```
// washington greet.js --dry
// ```
//
// The interesting thing about this (besides convenience) is that the
// code file is a fully functional module, requirable and production ready.
// Washington is added as a dependency but that is not really a concern
// in most applications. The file itself does not contain an invocation to
// actually run the examples, so the examples are just stored by Node unless
// you run them manually from another script.
//
// In essence, what the command line tool does is requiring **Washington**
// and the file and running Washington. You can also require the script
// `greet.js` in another script that itself has some Washington specs
// and run them all together from the command line. As a way of organizing
// the examples, it is really concise and convenient.
{'fraction_non_alphanumeric': 0.16894296829732638, 'fraction_numerical': 0.010926247827166625, 'mean_word_length': 2.6457453228726613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5953178', 'n_tokens_mistral': 3573, 'n_tokens_neox': 3452, 'n_words': 1360}