Skip to content

Instantly share code, notes, and snippets.

@also
Last active December 27, 2015 10:39
Show Gist options
  • Save also/7312966 to your computer and use it in GitHub Desktop.
Save also/7312966 to your computer and use it in GitHub Desktop.
calling simple-check generators from node.js/coffeescript
# https://github.com/also/simple-check/tree/cljx
goo = require './goog' # https://gist.github.com/also/7189192
goog = goo 'target/unoptimized/goog'
goog.load 'target/unoptimized.js'
cljs = goog.require 'cljs.core'
gen = goog.require 'simple_check.generators'
console.log cljs.clj__GT_js gen.sample gen.int$
console.log cljs.clj__GT_js gen.sample gen.vector gen.string_ascii
# [ 0, -1, 0, 2, -4, -5, -3, 3, 5, 4 ]
# [ [],
# [ 'K' ],
# [ '', '\'' ],
# [ '<!e' ],
# [],
# [ '$', '|A', '~ts' ],
# [ 'X[`}', 'b|q', '>', 'Mk' ],
# [ 'fC{{8', '\']\'', 'H' ],
# [ 'P/*JGF=', '?$*', '5', '(/', '3UWwB(D' ],
# [ 'Sz7', 'gu' ] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment