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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#SingleInstance force | |
; -------------------------------------------------------------- | |
; NOTES | |
; -------------------------------------------------------------- | |
; ! = ALT | |
; ^ = CTRL |
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
const crypto = require('crypto') | |
describe('Predictable Randomness', () => { | |
describe('Math.random', () => { | |
const firstResult = 0.37454011430963874 | |
const secondResult = 0.7965429842006415 | |
beforeEach(() => Math.__clearChances__()) | |
it('should produce these two numbers first by default', () => { | |
expect(Math.random()).toEqual(firstResult) | |
expect(Math.random()).toEqual(secondResult) |
OlderNewer