How to use spec3 method in stryker-parent

Best JavaScript code snippet using stryker-parent

CubeMoveStringifier.spec.ts

Source:CubeMoveStringifier.spec.ts Github

copy

Full Screen

1import { CubeSpecification, CubeMoveStringifier, CubeMove, CubeFace } from "../../src";23const spec3 = new CubeSpecification(3);4const spec8 = new CubeSpecification(8);5const cms3 = new CubeMoveStringifier(spec3);6const cms8 = new CubeMoveStringifier(spec8);78test('Single Face Move Parse Test', () => {910 expect(cms3.parse('R')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 1)]);11 expect(cms3.parse('U')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, 1)]);12 expect(cms3.parse('F')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 1)]);13 expect(cms3.parse('L')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 1)]);14 expect(cms3.parse('D')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 1)]);15 expect(cms3.parse('B')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, 1)]);1617 expect(cms3.parse('R2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 2)]);18 expect(cms3.parse('U2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, 2)]);19 expect(cms3.parse('F2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 2)]);20 expect(cms3.parse('L2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 2)]);21 expect(cms3.parse('D2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 2)]);22 expect(cms3.parse('B2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, 2)]);2324 expect(cms3.parse('R\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, -1)]);25 expect(cms3.parse('U\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, -1)]);26 expect(cms3.parse('F\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, -1)]);27 expect(cms3.parse('L\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, -1)]);28 expect(cms3.parse('D\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, -1)]);29 expect(cms3.parse('B\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, -1)]);3031});3233test('Single Outer Block Move (default slices) Parse Test', () => {3435 expect(cms3.parse('Rw')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 1)]);36 expect(cms3.parse('Uw')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 1)]);37 expect(cms3.parse('Fw')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 1)]);38 expect(cms3.parse('Lw')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 1)]);39 expect(cms3.parse('Dw')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 1)]);40 expect(cms3.parse('Bw')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 1)]);4142 expect(cms3.parse('Rw2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 2)]);43 expect(cms3.parse('Uw2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 2)]);44 expect(cms3.parse('Fw2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 2)]);45 expect(cms3.parse('Lw2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 2)]);46 expect(cms3.parse('Dw2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 2)]);47 expect(cms3.parse('Bw2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 2)]);4849 expect(cms3.parse('Rw\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, -1)]);50 expect(cms3.parse('Uw\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, -1)]);51 expect(cms3.parse('Fw\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, -1)]);52 expect(cms3.parse('Lw\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, -1)]);53 expect(cms3.parse('Dw\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, -1)]);54 expect(cms3.parse('Bw\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, -1)]);5556 expect(cms3.parse('r')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 1)]);57 expect(cms3.parse('u')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 1)]);58 expect(cms3.parse('f')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 1)]);59 expect(cms3.parse('l')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 1)]);60 expect(cms3.parse('d')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 1)]);61 expect(cms3.parse('b')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 1)]);6263 expect(cms3.parse('r2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 2)]);64 expect(cms3.parse('u2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 2)]);65 expect(cms3.parse('f2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 2)]);66 expect(cms3.parse('l2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 2)]);67 expect(cms3.parse('d2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 2)]);68 expect(cms3.parse('b2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 2)]);6970 expect(cms3.parse('r\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, -1)]);71 expect(cms3.parse('u\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, -1)]);72 expect(cms3.parse('f\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, -1)]);73 expect(cms3.parse('l\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, -1)]);74 expect(cms3.parse('d\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, -1)]);75 expect(cms3.parse('b\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, -1)]);7677});7879test('Single Outer Block Move (1 slice) Parse Test', () => {8081 expect(cms3.parse('1Rw')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 1)]);82 expect(cms3.parse('1Uw')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, 1)]);83 expect(cms3.parse('1Fw')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 1)]);84 expect(cms3.parse('1Lw')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 1)]);85 expect(cms3.parse('1Dw')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 1)]);86 expect(cms3.parse('1Bw')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, 1)]);8788 expect(cms3.parse('1Rw2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 2)]);89 expect(cms3.parse('1Uw2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, 2)]);90 expect(cms3.parse('1Fw2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 2)]);91 expect(cms3.parse('1Lw2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 2)]);92 expect(cms3.parse('1Dw2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 2)]);93 expect(cms3.parse('1Bw2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, 2)]);9495 expect(cms3.parse('1Rw\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, -1)]);96 expect(cms3.parse('1Uw\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, -1)]);97 expect(cms3.parse('1Fw\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, -1)]);98 expect(cms3.parse('1Lw\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, -1)]);99 expect(cms3.parse('1Dw\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, -1)]);100 expect(cms3.parse('1Bw\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, -1)]);101102 expect(cms3.parse('1r')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 1)]);103 expect(cms3.parse('1u')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, 1)]);104 expect(cms3.parse('1f')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 1)]);105 expect(cms3.parse('1l')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 1)]);106 expect(cms3.parse('1d')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 1)]);107 expect(cms3.parse('1b')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, 1)]);108109 expect(cms3.parse('1r2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 2)]);110 expect(cms3.parse('1u2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, 2)]);111 expect(cms3.parse('1f2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 2)]);112 expect(cms3.parse('1l2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 2)]);113 expect(cms3.parse('1d2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 2)]);114 expect(cms3.parse('1b2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, 2)]);115116 expect(cms3.parse('1r\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, -1)]);117 expect(cms3.parse('1u\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 1, -1)]);118 expect(cms3.parse('1f\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 1, -1)]);119 expect(cms3.parse('1l\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 1, -1)]);120 expect(cms3.parse('1d\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 1, -1)]);121 expect(cms3.parse('1b\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 1, -1)]);122123});124125test('Single Outer Block Move (2 slices) Parse Test', () => {126127 expect(cms3.parse('2Rw')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 1)]);128 expect(cms3.parse('2Uw')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 1)]);129 expect(cms3.parse('2Fw')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 1)]);130 expect(cms3.parse('2Lw')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 1)]);131 expect(cms3.parse('2Dw')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 1)]);132 expect(cms3.parse('2Bw')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 1)]);133134 expect(cms3.parse('2Rw2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 2)]);135 expect(cms3.parse('2Uw2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 2)]);136 expect(cms3.parse('2Fw2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 2)]);137 expect(cms3.parse('2Lw2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 2)]);138 expect(cms3.parse('2Dw2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 2)]);139 expect(cms3.parse('2Bw2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 2)]);140141 expect(cms3.parse('2Rw\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, -1)]);142 expect(cms3.parse('2Uw\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, -1)]);143 expect(cms3.parse('2Fw\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, -1)]);144 expect(cms3.parse('2Lw\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, -1)]);145 expect(cms3.parse('2Dw\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, -1)]);146 expect(cms3.parse('2Bw\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, -1)]);147148 expect(cms3.parse('2r')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 1)]);149 expect(cms3.parse('2u')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 1)]);150 expect(cms3.parse('2f')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 1)]);151 expect(cms3.parse('2l')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 1)]);152 expect(cms3.parse('2d')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 1)]);153 expect(cms3.parse('2b')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 1)]);154155 expect(cms3.parse('2r2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 2)]);156 expect(cms3.parse('2u2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, 2)]);157 expect(cms3.parse('2f2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 2)]);158 expect(cms3.parse('2l2')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 2)]);159 expect(cms3.parse('2d2')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 2)]);160 expect(cms3.parse('2b2')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, 2)]);161162 expect(cms3.parse('2r\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, -1)]);163 expect(cms3.parse('2u\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 2, -1)]);164 expect(cms3.parse('2f\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 2, -1)]);165 expect(cms3.parse('2l\'')).toEqual([new CubeMove(spec3, CubeFace.LEFT, 1, 2, -1)]);166 expect(cms3.parse('2d\'')).toEqual([new CubeMove(spec3, CubeFace.DOWN, 1, 2, -1)]);167 expect(cms3.parse('2b\'')).toEqual([new CubeMove(spec3, CubeFace.BACK, 1, 2, -1)]);168169});170171test('Single Outer Block Move (6 slices, Octocube) Parse Test', () => {172173 expect(cms8.parse('6Rw')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 1, 6, 1)]);174 expect(cms8.parse('6Uw')).toEqual([new CubeMove(spec8, CubeFace.UP, 1, 6, 1)]);175 expect(cms8.parse('6Fw')).toEqual([new CubeMove(spec8, CubeFace.FRONT, 1, 6, 1)]);176 expect(cms8.parse('6Lw')).toEqual([new CubeMove(spec8, CubeFace.LEFT, 1, 6, 1)]);177 expect(cms8.parse('6Dw')).toEqual([new CubeMove(spec8, CubeFace.DOWN, 1, 6, 1)]);178 expect(cms8.parse('6Bw')).toEqual([new CubeMove(spec8, CubeFace.BACK, 1, 6, 1)]);179180 expect(cms8.parse('6Rw2')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 1, 6, 2)]);181 expect(cms8.parse('6Uw2')).toEqual([new CubeMove(spec8, CubeFace.UP, 1, 6, 2)]);182 expect(cms8.parse('6Fw2')).toEqual([new CubeMove(spec8, CubeFace.FRONT, 1, 6, 2)]);183 expect(cms8.parse('6Lw2')).toEqual([new CubeMove(spec8, CubeFace.LEFT, 1, 6, 2)]);184 expect(cms8.parse('6Dw2')).toEqual([new CubeMove(spec8, CubeFace.DOWN, 1, 6, 2)]);185 expect(cms8.parse('6Bw2')).toEqual([new CubeMove(spec8, CubeFace.BACK, 1, 6, 2)]);186187 expect(cms8.parse('6Rw\'')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 1, 6, -1)]);188 expect(cms8.parse('6Uw\'')).toEqual([new CubeMove(spec8, CubeFace.UP, 1, 6, -1)]);189 expect(cms8.parse('6Fw\'')).toEqual([new CubeMove(spec8, CubeFace.FRONT, 1, 6, -1)]);190 expect(cms8.parse('6Lw\'')).toEqual([new CubeMove(spec8, CubeFace.LEFT, 1, 6, -1)]);191 expect(cms8.parse('6Dw\'')).toEqual([new CubeMove(spec8, CubeFace.DOWN, 1, 6, -1)]);192 expect(cms8.parse('6Bw\'')).toEqual([new CubeMove(spec8, CubeFace.BACK, 1, 6, -1)]);193194 expect(cms8.parse('6r')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 1, 6, 1)]);195 expect(cms8.parse('6u')).toEqual([new CubeMove(spec8, CubeFace.UP, 1, 6, 1)]);196 expect(cms8.parse('6f')).toEqual([new CubeMove(spec8, CubeFace.FRONT, 1, 6, 1)]);197 expect(cms8.parse('6l')).toEqual([new CubeMove(spec8, CubeFace.LEFT, 1, 6, 1)]);198 expect(cms8.parse('6d')).toEqual([new CubeMove(spec8, CubeFace.DOWN, 1, 6, 1)]);199 expect(cms8.parse('6b')).toEqual([new CubeMove(spec8, CubeFace.BACK, 1, 6, 1)]);200201 expect(cms8.parse('6r2')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 1, 6, 2)]);202 expect(cms8.parse('6u2')).toEqual([new CubeMove(spec8, CubeFace.UP, 1, 6, 2)]);203 expect(cms8.parse('6f2')).toEqual([new CubeMove(spec8, CubeFace.FRONT, 1, 6, 2)]);204 expect(cms8.parse('6l2')).toEqual([new CubeMove(spec8, CubeFace.LEFT, 1, 6, 2)]);205 expect(cms8.parse('6d2')).toEqual([new CubeMove(spec8, CubeFace.DOWN, 1, 6, 2)]);206 expect(cms8.parse('6b2')).toEqual([new CubeMove(spec8, CubeFace.BACK, 1, 6, 2)]);207208 expect(cms8.parse('6r\'')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 1, 6, -1)]);209 expect(cms8.parse('6u\'')).toEqual([new CubeMove(spec8, CubeFace.UP, 1, 6, -1)]);210 expect(cms8.parse('6f\'')).toEqual([new CubeMove(spec8, CubeFace.FRONT, 1, 6, -1)]);211 expect(cms8.parse('6l\'')).toEqual([new CubeMove(spec8, CubeFace.LEFT, 1, 6, -1)]);212 expect(cms8.parse('6d\'')).toEqual([new CubeMove(spec8, CubeFace.DOWN, 1, 6, -1)]);213 expect(cms8.parse('6b\'')).toEqual([new CubeMove(spec8, CubeFace.BACK, 1, 6, -1)]);214215});216217test('Single Rotation Move Parse Test', () => {218219 expect(cms3.parse('x')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 3, 1)]);220 expect(cms3.parse('y')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 3, 1)]);221 expect(cms3.parse('z')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 3, 1)]);222223 expect(cms3.parse('x2')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 3, 2)]);224 expect(cms3.parse('y2')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 3, 2)]);225 expect(cms3.parse('z2')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 3, 2)]);226227 expect(cms3.parse('x\'')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 1, 3, -1)]);228 expect(cms3.parse('y\'')).toEqual([new CubeMove(spec3, CubeFace.UP, 1, 3, -1)]);229 expect(cms3.parse('z\'')).toEqual([new CubeMove(spec3, CubeFace.FRONT, 1, 3, -1)]);230231});232233test('Multi Move Parse Test', () => {234235 expect(cms3.parse('3R 2Fw\' Fw U2 U U')).toEqual([new CubeMove(spec3, CubeFace.RIGHT, 3, 3, 1), new CubeMove(spec3, CubeFace.FRONT, 1, 2, -1), new CubeMove(spec3, CubeFace.FRONT, 1, 2, 1), new CubeMove(spec3, CubeFace.UP, 1, 1, 2), new CubeMove(spec3, CubeFace.UP, 1, 1, 1), new CubeMove(spec3, CubeFace.UP, 1, 1, 1)]);236 expect(cms8.parse('2-4r3\' m8 M2\'')).toEqual([new CubeMove(spec8, CubeFace.RIGHT, 2, 4, -3), new CubeMove(spec8, CubeFace.LEFT, 2, 7, 8)]);237238});239240test('Complex Parse Test', () => {241242 expect(cms3.parse('(2D\' R2)2\'')).toEqual(cms3.parse('R2\' 2D R2\' 2D'));243 expect(cms3.parse('[U: L]')).toEqual(cms3.parse('U L U\''));244 expect(cms3.parse('[U, L]')).toEqual(cms3.parse('U L U\' L\''));245246 expect(cms3.parse('[[2U: (R 2D)]2\', L]')).toEqual(cms3.parse('2U 2D\' R\' 2U\' 2U 2D\' R\' 2U\' L 2U R 2D 2U\' 2U R 2D 2U\' L\''));247 expect(cms3.parse('(U3 (3R)\')2\'')).toEqual(cms3.parse('3R U3\' 3R U3\''));248249 expect(cms3.parse('M10')).toEqual(cms3.parse('M10'));250 expect(cms3.parse('(M)10')).toEqual(cms3.parse('M M M M M M M M M M'));251 expect(cms3.parse('(U F)3')).toEqual(cms3.parse('U F U F U F'));252 expect(cms3.parse('(U F)10')).toEqual(cms3.parse('U F U F U F U F U F U F U F U F U F U F'));253 expect(cms3.parse('[D,R]28')).toEqual(cms3.parse('[D,R]27 [D,R]'));254 expect(cms8.parse('(M)3\'')).toEqual(cms8.parse(''));255 expect(cms8.parse('[M: L]')).toEqual(cms8.parse('L'));256 expect(cms8.parse('[U, M]')).toEqual(cms8.parse('U U\''));257258});259260test('Single Face Move Stringify Test', () => {261262 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 1)])).toEqual('R');263 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 1, 1)])).toEqual('U');264 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 1)])).toEqual('F');265 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 1)])).toEqual('L');266 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 1)])).toEqual('D');267 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 1, 1)])).toEqual('B');268269 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, 2)])).toEqual('R2');270 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 1, 2)])).toEqual('U2');271 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 1, 2)])).toEqual('F2');272 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 1, 2)])).toEqual('L2');273 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 1, 2)])).toEqual('D2');274 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 1, 2)])).toEqual('B2');275276 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 1, -1)])).toEqual('R\'');277 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 1, -1)])).toEqual('U\'');278 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 1, -1)])).toEqual('F\'');279 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 1, -1)])).toEqual('L\'');280 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 1, -1)])).toEqual('D\'');281 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 1, -1)])).toEqual('B\'');282283});284285test('Single Outer Block Move (2 slice) Stringify Test', () => {286287 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 1)])).toEqual('r');288 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 2, 1)])).toEqual('u');289 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 1)])).toEqual('f');290 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 1)])).toEqual('l');291 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 1)])).toEqual('d');292 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 2, 1)])).toEqual('b');293294 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, 2)])).toEqual('r2');295 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 2, 2)])).toEqual('u2');296 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 2, 2)])).toEqual('f2');297 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 2, 2)])).toEqual('l2');298 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 2)])).toEqual('d2');299 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 2, 2)])).toEqual('b2');300301 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 2, -1)])).toEqual('r\'');302 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 2, -1)])).toEqual('u\'');303 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 2, -1)])).toEqual('f\'');304 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 2, -1)])).toEqual('l\'');305 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 2, -1)])).toEqual('d\'');306 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 2, -1)])).toEqual('b\'');307308});309310test('Single Outer Block Move (3 slice, Quadrocube) Stringify Test', () => {311312 expect(cms8.stringify([new CubeMove(spec8, CubeFace.RIGHT, 1, 3, 1)])).toEqual('3r');313 expect(cms8.stringify([new CubeMove(spec8, CubeFace.UP, 1, 3, 1)])).toEqual('3u');314 expect(cms8.stringify([new CubeMove(spec8, CubeFace.FRONT, 1, 3, 1)])).toEqual('3f');315 expect(cms8.stringify([new CubeMove(spec8, CubeFace.LEFT, 1, 3, 1)])).toEqual('3l');316 expect(cms8.stringify([new CubeMove(spec8, CubeFace.DOWN, 1, 3, 1)])).toEqual('3d');317 expect(cms8.stringify([new CubeMove(spec8, CubeFace.BACK, 1, 3, 1)])).toEqual('3b');318319 expect(cms8.stringify([new CubeMove(spec8, CubeFace.RIGHT, 1, 3, 2)])).toEqual('3r2');320 expect(cms8.stringify([new CubeMove(spec8, CubeFace.UP, 1, 3, 2)])).toEqual('3u2');321 expect(cms8.stringify([new CubeMove(spec8, CubeFace.FRONT, 1, 3, 2)])).toEqual('3f2');322 expect(cms8.stringify([new CubeMove(spec8, CubeFace.LEFT, 1, 3, 2)])).toEqual('3l2');323 expect(cms8.stringify([new CubeMove(spec8, CubeFace.DOWN, 1, 3, 2)])).toEqual('3d2');324 expect(cms8.stringify([new CubeMove(spec8, CubeFace.BACK, 1, 3, 2)])).toEqual('3b2');325326 expect(cms8.stringify([new CubeMove(spec8, CubeFace.RIGHT, 1, 3, -1)])).toEqual('3r\'');327 expect(cms8.stringify([new CubeMove(spec8, CubeFace.UP, 1, 3, -1)])).toEqual('3u\'');328 expect(cms8.stringify([new CubeMove(spec8, CubeFace.FRONT, 1, 3, -1)])).toEqual('3f\'');329 expect(cms8.stringify([new CubeMove(spec8, CubeFace.LEFT, 1, 3, -1)])).toEqual('3l\'');330 expect(cms8.stringify([new CubeMove(spec8, CubeFace.DOWN, 1, 3, -1)])).toEqual('3d\'');331 expect(cms8.stringify([new CubeMove(spec8, CubeFace.BACK, 1, 3, -1)])).toEqual('3b\'');332333});334335test('Single Rotation Move (3 slice) Stringify Test', () => {336337 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 3, 1)])).toEqual('x');338 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 3, 1)])).toEqual('y');339 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 3, 1)])).toEqual('z');340 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 3, 1)])).toEqual('x\'');341 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 3, 1)])).toEqual('y\'');342 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 3, 1)])).toEqual('z\'');343344 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 3, 2)])).toEqual('x2');345 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 3, 2)])).toEqual('y2');346 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 3, 2)])).toEqual('z2');347 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 3, 2)])).toEqual('x2\'');348 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 3, 2)])).toEqual('y2\'');349 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 3, 2)])).toEqual('z2\'');350351 expect(cms3.stringify([new CubeMove(spec3, CubeFace.RIGHT, 1, 3, -1)])).toEqual('x\'');352 expect(cms3.stringify([new CubeMove(spec3, CubeFace.UP, 1, 3, -1)])).toEqual('y\'');353 expect(cms3.stringify([new CubeMove(spec3, CubeFace.FRONT, 1, 3, -1)])).toEqual('z\'');354 expect(cms3.stringify([new CubeMove(spec3, CubeFace.LEFT, 1, 3, -1)])).toEqual('x');355 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 3, -1)])).toEqual('y');356 expect(cms3.stringify([new CubeMove(spec3, CubeFace.BACK, 1, 3, -1)])).toEqual('z');357358});359360test('Multi Move Stringify Test', () => {361362 expect(cms3.stringify([new CubeMove(spec3, CubeFace.DOWN, 1, 2, 5), new CubeMove(spec3, CubeFace.BACK, 1, 3, -5), new CubeMove(spec3, CubeFace.UP, 1, 1, 2)])).toEqual('d5 z5 U2');363 ...

Full Screen

Full Screen

build-openapi.js

Source:build-openapi.js Github

copy

Full Screen

1#!/usr/bin/env node2const fs = require("fs")3const OAS = require("oas-normalize")4const swaggerInline = require("swagger-inline")5// Storefront API6swaggerInline(7 ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/store"],8 {9 base: "./docs/api/store-spec3-base.json",10 }11).then((gen) => {12 const oas = new OAS(gen)13 oas14 .validate(true)15 .then(() => {16 fs.writeFileSync("./docs/api/store-spec3.json", gen)17 })18 .catch((err) => {19 console.log("Error in store")20 console.error(err)21 })22})23swaggerInline(24 ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/store"],25 {26 base: "./docs/api/store-spec3-base.json",27 format: "yaml",28 }29).then((gen) => {30 fs.writeFileSync("./docs/api/store-spec3.yaml", gen)31})32// Admin API33swaggerInline(34 ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/admin"],35 {36 base: "./docs/api/admin-spec3-base.json",37 }38).then((gen) => {39 const oas = new OAS(gen)40 oas41 .validate(true)42 .then(() => {43 fs.writeFileSync("./docs/api/admin-spec3.json", gen)44 })45 .catch((err) => {46 console.log("Error in admin")47 console.error(err)48 })49})50swaggerInline(51 ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/admin"],52 {53 base: "./docs/api/admin-spec3-base.json",54 format: "yaml",55 }56).then((gen) => {57 fs.writeFileSync("./docs/api/admin-spec3.yaml", gen)...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const strykerParent = require('stryker-parent');2strykerParent.spec3();3const strykerChild = require('stryker-child');4strykerChild.spec3();5module.exports = {6 spec1: () => {7 console.log('spec1');8 },9 spec2: () => {10 console.log('spec2');11 },12 spec3: () => {13 console.log('spec3');14 }15};16const strykerParent = require('stryker-parent');17module.exports = {18};19module.exports = function(config) {20 config.set({21 });22};

Full Screen

Using AI Code Generation

copy

Full Screen

1const strykerParent = require('stryker-parent');2strykerParent.spec3();3const strykerChild = require('stryker-child');4strykerChild.spec3();511 03 2020 16:32:36.215:INFO [Stryker]: 2 Mutant(s) generated611 03 2020 16:32:36.215:INFO [Stryker]: 2 Mutant(s) remaining711 03 2020 16:32:36.216:INFO [Stryker]: 2 Mutant(s) generated811 03 2020 16:32:36.216:INFO [Stryker]: 2 Mutant(s) remaining911 03 2020 16:32:36.217:INFO [Stryker]: 2 Mutant(s) generated1011 03 2020 16:32:36.217:INFO [Stryker]: 2 Mutant(s) remaining1111 03 2020 16:32:36.218:INFO [Stryker]: 2 Mutant(s) generated1211 03 2020 16:32:36.218:INFO [Stryker]: 2 Mutant(s

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var strykerParent2 = require('stryker-parent2');3var strykerParent3 = require('stryker-parent3');4var strykerParent4 = require('stryker-parent4');5var strykerParent5 = require('stryker-parent5');6var strykerParent6 = require('stryker-parent6');7var strykerParent7 = require('stryker-parent7');8var strykerParent8 = require('stryker-parent8');9var strykerParent9 = require('stryker-parent9');10var strykerParent10 = require('stryker-parent10');11var strykerParent11 = require('stryker-parent11');12var strykerParent12 = require('stryker-parent12');13var strykerParent13 = require('stryker-parent13');14var strykerParent14 = require('stryker-parent14');15var strykerParent15 = require('stryker-parent15');16var strykerParent16 = require('stryker-parent16');17var strykerParent17 = require('stryker-parent17');18var strykerParent18 = require('stryker-parent18');19var strykerParent19 = require('stryker-parent19');20var strykerParent20 = require('stryker-parent20');21var strykerParent21 = require('stryker-parent21');22var strykerParent22 = require('stryker-parent22');23var strykerParent23 = require('stryker-parent23');24var strykerParent24 = require('stryker-parent24');25var strykerParent25 = require('stryker-parent25');26var strykerParent26 = require('stryker-parent26');27var strykerParent27 = require('stryker-parent27');28var strykerParent28 = require('stryker-parent28');29var strykerParent29 = require('stryker-parent29');30var strykerParent30 = require('stryker-parent30');31var strykerParent31 = require('stryker-parent31');32var strykerParent32 = require('stryker-parent32');33var strykerParent33 = require('stryker-parent33');34var strykerParent34 = require('stryker-parent34');35var strykerParent35 = require('stryker-parent35');36var strykerParent36 = require('stryker

Full Screen

Using AI Code Generation

copy

Full Screen

1const strykerParent = require('stryker-parent');2const strykerParentSpec3 = strykerParent.spec3;3strykerParentSpec3();4const strykerParent = require('stryker-parent');5const strykerParentSpec3 = strykerParent.spec3;6strykerParentSpec3();7const strykerParent = require('stryker-parent');8const strykerParentSpec3 = strykerParent.spec3;9strykerParentSpec3();10const strykerParent = require('stryker-parent');11const strykerParentSpec3 = strykerParent.spec3;12strykerParentSpec3();13const strykerParent = require('stryker-parent');14const strykerParentSpec3 = strykerParent.spec3;15strykerParentSpec3();16const strykerParent = require('stryker-parent');17const strykerParentSpec3 = strykerParent.spec3;18strykerParentSpec3();19const strykerParent = require('stryker-parent');20const strykerParentSpec3 = strykerParent.spec3;21strykerParentSpec3();22const strykerParent = require('stryker-parent');23const strykerParentSpec3 = strykerParent.spec3;24strykerParentSpec3();25const strykerParent = require('stryker-parent');26const strykerParentSpec3 = strykerParent.spec3;27strykerParentSpec3();28const strykerParent = require('stryker-parent');29const strykerParentSpec3 = strykerParent.spec3;

Full Screen

Using AI Code Generation

copy

Full Screen

1const strykerParent = require('stryker-parent');2const strykerParentSpec3 = strykerParent.spec3;3strykerParentSpec3();4const strykerParent = require('stryker-parent');5const strykerParentSpec2 = strykerParent.spec2;6strykerParentSpec2();7const strykerParent = require('stryker-parent');8const strykerParentSpec1 = strykerParent.spec1;9strykerParentSpec1();10const strykerParent = require('stryker-parent');11const strykerParentSpec4 = strykerParent.spec4;12strykerParentSpec4();13const strykerParent = require('stryker-parent');14const strykerParentSpec5 = strykerParent.spec5;15strykerParentSpec5();16const strykerParent = require('stryker-parent');17const strykerParentSpec6 = strykerParent.spec6;18strykerParentSpec6();19const strykerParent = require('stryker-parent');20const strykerParentSpec7 = strykerParent.spec7;21strykerParentSpec7();22const strykerParent = require('stryker-parent');23const strykerParentSpec8 = strykerParent.spec8;24strykerParentSpec8();25const strykerParent = require('stryker-parent');26const strykerParentSpec9 = strykerParent.spec9;27strykerParentSpec9();28const strykerParent = require('stryker-parent');29const strykerParentSpec10 = strykerParent.spec10;

Full Screen

Using AI Code Generation

copy

Full Screen

1var spec3 = function() {2 console.log("spec3");3}4var spec1 = function() {5 console.log("spec1");6}7var spec2 = function() {8 console.log("spec2");9}10var spec3 = function() {11 console.log("spec3");12}13var spec3 = function() {14 console.log("spec3");15}16var spec3 = function() {17 console.log("spec3");18}19var spec3 = function() {20 console.log("spec3");21}22var spec3 = function() {23 console.log("spec3");24}25var spec3 = function() {26 console.log("spec3");27}28var spec3 = function() {29 console.log("spec3");30}31var spec3 = function() {32 console.log("spec3");33}34var spec3 = function() {35 console.log("spec3");36}37var spec3 = function() {38 console.log("spec3");39}40var spec3 = function() {41 console.log("spec3");42}43var spec3 = function() {44 console.log("spec3");45}46var spec3 = function() {47 console.log("spec3");48}49var spec3 = function() {50 console.log("spec3");51}

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful