TAP version 13
# Subtest: the shipped game has zero runtime dependencies and the three npm scripts
ok 1 - the shipped game has zero runtime dependencies and the three npm scripts
  ---
  duration_ms: 1.768675
  type: 'test'
  ...
# Subtest: no external URLs, no downloaded assets, no dialogs, no framework imports in the game
ok 2 - no external URLs, no downloaded assets, no dialogs, no framework imports in the game
  ---
  duration_ms: 1.23224
  type: 'test'
  ...
# Subtest: no other game's name appears in the game
ok 3 - no other game's name appears in the game
  ---
  duration_ms: 0.744899
  type: 'test'
  ...
# Subtest: the slide trace the view animates from is consistent with the board the engine produces
not ok 4 - the slide trace the view animates from is consistent with the board the engine produces
  ---
  duration_ms: 7.530387
  type: 'test'
  location: '/tmp/phase2/B/tests/constraints.test.js:40:1'
  failureType: 'testCodeFailure'
  error: |-
    Property failed after 4 tests
    { seed: 1554519712, path: "3:0:0:0:0:0:0:0:0:0:0:0", endOnFailure: true }
    Counterexample: [[2,2,2,2,2,2,2,2,0,2,2,2,2,2,0,2],"up"]
    Shrunk 11 time(s)
    
    Hint: Enable verbose mode in order to have the list of all failing values encountered during the run
  code: 'ERR_TEST_FAILURE'
  stack: |-
    buildError (file:///home/claude/merge-game/node_modules/fast-check/lib/fast-check.js:2497:16)
    throwIfFailed (file:///home/claude/merge-game/node_modules/fast-check/lib/fast-check.js:2504:8)
    reportRunDetails (file:///home/claude/merge-game/node_modules/fast-check/lib/fast-check.js:2520:14)
    Module.assert (file:///home/claude/merge-game/node_modules/fast-check/lib/fast-check.js:2711:53)
    TestContext.<anonymous> (file:///tmp/phase2/B/tests/constraints.test.js:43:6)
    Test.runInAsyncScope (node:async_hooks:214:14)
    Test.run (node:internal/test_runner/test:1047:25)
    Test.processPendingSubtests (node:internal/test_runner/test:744:18)
    Test.postRun (node:internal/test_runner/test:1173:19)
    Test.run (node:internal/test_runner/test:1101:12)
  ...
# Subtest: hash and generator match the spec text
ok 5 - hash and generator match the spec text
  ---
  duration_ms: 2.350895
  type: 'test'
  ...
# Subtest: the object has exactly the nine methods of the spec
ok 6 - the object has exactly the nine methods of the spec
  ---
  duration_ms: 0.817448
  type: 'test'
  ...
# Subtest: a new game has two tiles, score 0, three undos
ok 7 - a new game has two tiles, score 0, three undos
  ---
  duration_ms: 0.309443
  type: 'test'
  ...
# Subtest: seed() is a string; number and string seeds give the same game
ok 8 - seed() is a string; number and string seeds give the same game
  ---
  duration_ms: 0.232056
  type: 'test'
  ...
# Subtest: new game draws: value first, then cell, twice, with seed fnv1a32(String(seed))
ok 9 - new game draws: value first, then cell, twice, with seed fnv1a32(String(seed))
  ---
  duration_ms: 0.303546
  type: 'test'
  ...
# Subtest: spec example: 2 2 4 4 moved left gives 4 8 and scores 20
not ok 10 - spec example: 2 2 4 4 moved left gives 4 8 and scores 20
  ---
  duration_ms: 0.945763
  type: 'test'
  location: '/tmp/phase2/B/tests/engine.test.js:75:1'
  failureType: 'testCodeFailure'
  error: |-
    Expected values to be strictly equal:
    
    12 !== 20
    
  code: 'ERR_ASSERTION'
  name: 'AssertionError'
  expected: 20
  actual: 12
  operator: 'strictEqual'
  stack: |-
    TestContext.<anonymous> (file:///tmp/phase2/B/tests/engine.test.js:80:10)
    Test.runInAsyncScope (node:async_hooks:214:14)
    Test.run (node:internal/test_runner/test:1047:25)
    Test.processPendingSubtests (node:internal/test_runner/test:744:18)
    Test.postRun (node:internal/test_runner/test:1173:19)
    Test.run (node:internal/test_runner/test:1101:12)
    async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
  ...
# Subtest: move result has exactly moved, merges, gained, spawned
ok 11 - move result has exactly moved, merges, gained, spawned
  ---
  duration_ms: 0.235676
  type: 'test'
  ...
# Subtest: a tile merges at most once per move
not ok 12 - a tile merges at most once per move
  ---
  duration_ms: 0.23248
  type: 'test'
  location: '/tmp/phase2/B/tests/engine.test.js:97:1'
  failureType: 'testCodeFailure'
  error: |-
    Expected values to be strictly equal:
    
    8 !== 12
    
  code: 'ERR_ASSERTION'
  name: 'AssertionError'
  expected: 12
  actual: 8
  operator: 'strictEqual'
  stack: |-
    TestContext.<anonymous> (file:///tmp/phase2/B/tests/engine.test.js:101:10)
    Test.runInAsyncScope (node:async_hooks:214:14)
    Test.run (node:internal/test_runner/test:1047:25)
    Test.processPendingSubtests (node:internal/test_runner/test:744:18)
    Test.postRun (node:internal/test_runner/test:1173:19)
    Test.run (node:internal/test_runner/test:1101:12)
    async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
  ...
# Subtest: merges resolve from the edge the tiles slide towards
ok 13 - merges resolve from the edge the tiles slide towards
  ---
  duration_ms: 0.356987
  type: 'test'
  ...
# Subtest: merge sequence order: rows top to bottom, columns left to right, edge first
not ok 14 - merge sequence order: rows top to bottom, columns left to right, edge first
  ---
  duration_ms: 0.336835
  type: 'test'
  location: '/tmp/phase2/B/tests/engine.test.js:133:1'
  failureType: 'testCodeFailure'
  error: |-
    Expected values to be strictly equal:
    
    28 !== 60
    
  code: 'ERR_ASSERTION'
  name: 'AssertionError'
  expected: 60
  actual: 28
  operator: 'strictEqual'
  stack: |-
    TestContext.<anonymous> (file:///tmp/phase2/B/tests/engine.test.js:138:10)
    Test.runInAsyncScope (node:async_hooks:214:14)
    Test.run (node:internal/test_runner/test:1047:25)
    Test.processPendingSubtests (node:internal/test_runner/test:744:18)
    Test.postRun (node:internal/test_runner/test:1173:19)
    Test.run (node:internal/test_runner/test:1101:12)
    async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
  ...
# Subtest: tiles slide as far as they can and rows do not leak into each other
ok 15 - tiles slide as far as they can and rows do not leak into each other
  ---
  duration_ms: 0.15366
  type: 'test'
  ...
# Subtest: a move that changes nothing is not a move
ok 16 - a move that changes nothing is not a move
  ---
  duration_ms: 0.129839
  type: 'test'
  ...
# Subtest: an unknown direction throws
ok 17 - an unknown direction throws
  ---
  duration_ms: 0.265514
  type: 'test'
  ...
# Subtest: exactly one tile spawns after a valid move, on an empty cell
ok 18 - exactly one tile spawns after a valid move, on an empty cell
  ---
  duration_ms: 1.26577
  type: 'test'
  ...
# Subtest: spawn draws the value first, then the cell among empty cells in row-major order
ok 19 - spawn draws the value first, then the cell among empty cells in row-major order
  ---
  duration_ms: 0.142339
  type: 'test'
  ...
# Subtest: undo: three charges, exact restore, cannot reroll a spawn
ok 20 - undo: three charges, exact restore, cannot reroll a spawn
  ---
  duration_ms: 0.129578
  type: 'test'
  ...
# Subtest: undo steps back one move per charge
ok 21 - undo steps back one move per charge
  ---
  duration_ms: 0.077583
  type: 'test'
  ...
# Subtest: game over: true exactly when no direction changes the board; undo still works
ok 22 - game over: true exactly when no direction changes the board; undo still works
  ---
  duration_ms: 0.185073
  type: 'test'
  ...
# Subtest: snapshot is plain JSON and restore brings back board, score, undos and random state
ok 23 - snapshot is plain JSON and restore brings back board, score, undos and random state
  ---
  duration_ms: 0.20585
  type: 'test'
  ...
# Subtest: after a restore, earlier moves can no longer be undone
ok 24 - after a restore, earlier moves can no longer be undone
  ---
  duration_ms: 0.175004
  type: 'test'
  ...
# Subtest: snapshot and board() are copies, not live views
ok 25 - snapshot and board() are copies, not live views
  ---
  duration_ms: 0.091975
  type: 'test'
  ...
# Subtest: spawn value is 2 about nine times in ten
ok 26 - spawn value is 2 about nine times in ten
  ---
  duration_ms: 23.031835
  type: 'test'
  ...
# Subtest: engine.js imports nothing and touches no DOM
ok 27 - engine.js imports nothing and touches no DOM
  ---
  duration_ms: 15.134034
  type: 'test'
  ...
1..27
# tests 27
# suites 0
# pass 23
# fail 4
# cancelled 0
# skipped 0
# todo 0
# duration_ms 184.691263
