/** * Enigma machine tests. * @author s2224834 * @copyright Crown Copyright 2019 * @license Apache-2.0 */ import TestRegister from "../../lib/TestRegister.mjs"; TestRegister.addTests([ { // Simplest test: A single keypress in the default position on a basic // Enigma. name: "Enigma: basic wiring", input: "G", expectedOutput: "P", recipeConfig: [ { "op": "Enigma", "args": [ "3-rotor", "", "A", "A", // Note: start on Z because it steps when the key is pressed "EKMFLGDQVZNTOWYHXUSPAIBRCJ