Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HULUROKU-6968 - update to rokucommunity/brs version 0.47.0 #140

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Nowele
Copy link
Collaborator

@Nowele Nowele commented Aug 26, 2024

Changes

Update to use rokucommunity/brs 0.47.0
Update brs references to rokucommunity/brs
Update roca version to 0.26.0

JIRA

[HULUROKU-6968]

Testing

  • yarn install
  • yarn run-s clean build test

Next Steps:

Once this change is stable and merged, we'll need to update the package.json in cube-roku for @hulu/roca: "^0.26.0" and @rokucommunity/brs: "^0.47.0"

Blockers:

  • Unit tests are failing, but inconsistently (this is even reproducible on main sometimes)
  • many dependencies are in need of upgrades, see dependabot PRs
  • I've tried testing individual dependabot PRs and some pass and some fail (again, this is not consistently reproducible)
  • I started to go down a larger yarn upgrade rabbit-hole so it may be preferred to do piece-meal upgrades since this project is very stale.

@Nowele Nowele marked this pull request as draft August 26, 2024 22:50
@Nowele Nowele marked this pull request as ready for review August 26, 2024 23:13
package.json Outdated Show resolved Hide resolved
@Nowele
Copy link
Collaborator Author

Nowele commented Aug 28, 2024

Tests are now failing:

yarn test
yarn run v1.22.19
$ jest
 PASS  test/runner/file-match.test.ts
 PASS  test/reporter/jest-reporter.test.ts
 FAIL  test/e2e/selection/selection.test.js
  ● Test suite failed to run

    Cannot find module '../../lib' from 'test/e2e/util.js'

    Require stack:
      test/e2e/util.js
      test/e2e/selection/selection.test.js

    > 1 | const roca = require("../../lib");
        |              ^
      2 | const path = require("path");
      3 |
      4 | /**

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:307:11)
      at Object.<anonymous> (test/e2e/util.js:1:14)

 FAIL  test/e2e/simple-suites/simple-suites.test.js
  ● Test suite failed to run

    Cannot find module '../../lib' from 'test/e2e/util.js'

    Require stack:
      test/e2e/util.js
      test/e2e/simple-suites/simple-suites.test.js

    > 1 | const roca = require("../../lib");
        |              ^
      2 | const path = require("path");
      3 |
      4 | /**

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:307:11)
      at Object.<anonymous> (test/e2e/util.js:1:14)

 FAIL  test/e2e/before-after/before-after.test.js
  ● Test suite failed to run

    Cannot find module '../../lib' from 'test/e2e/util.js'

    Require stack:
      test/e2e/util.js
      test/e2e/before-after/before-after.test.js

    > 1 | const roca = require("../../lib");
        |              ^
      2 | const path = require("path");
      3 |
      4 | /**

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:307:11)
      at Object.<anonymous> (test/e2e/util.js:1:14)

 FAIL  test/e2e/assert/assert.test.js
  ● Test suite failed to run

    Cannot find module '../../lib' from 'test/e2e/util.js'

    Require stack:
      test/e2e/util.js
      test/e2e/assert/assert.test.js

    > 1 | const roca = require("../../lib");
        |              ^
      2 | const path = require("path");
      3 |
      4 | /**

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:307:11)
      at Object.<anonymous> (test/e2e/util.js:1:14)

 FAIL  test/e2e/parameterized/parameterized.test.js
  ● Test suite failed to run

    Cannot find module '../../lib' from 'test/e2e/util.js'

    Require stack:
      test/e2e/util.js
      test/e2e/parameterized/parameterized.test.js

    > 1 | const roca = require("../../lib");
        |              ^
      2 | const path = require("path");
      3 |
      4 | /**

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:307:11)
      at Object.<anonymous> (test/e2e/util.js:1:14)

Test Suites: 5 failed, 2 passed, 7 total
Tests:       17 passed, 17 total
Snapshots:   0 total
Time:        2.002 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm unclear where that lib comes from so far

@Nowele
Copy link
Collaborator Author

Nowele commented Aug 29, 2024

yarn run-s clean build test
yarn run v1.22.19
$ /Users/nowele.rechka/src/personal/roca/node_modules/.bin/run-s clean build test
$ rimraf ./lib ./types
$ tsc
$ jest
 PASS  test/reporter/jest-reporter.test.ts
 PASS  test/runner/file-match.test.ts
1.. 1
1.. 1
    1.. 3
1.. 1
    1.. 3
1.. 3
1.. 4
    1.. 2
    1.. 3
        1.. 2
            1.. 1
    1.. 5
        1.. 4
        1.. 1
            1.. 1
    1.. 4
    1.. 2
        1.. 3
1.. 1
1.. 1
    1.. 4
        1.. 2
    1.. 3
        1.. 3
            1.. 3
                1.. 3
                    1.. 3
                        1.. 1
    1.. 3
1.. 1
    1.. 1
        1.. 1
            1.. 1
    1.. 3
    1.. 2
        1.. 1
        1.. 5
        1.. 2
            1.. 1
        1.. 3
            1.. 1
            1.. 1
1.. 1
1.. 2
    1.. 2
    1.. 4
    1.. 2
        1.. 5
1.. 1
    1.. 1
        1.. 1
1.. 4
1.. 1
    1.. 5
        1.. 4
    1.. 0
    1.. 4
1.. 2
    1.. 4
    1.. 3
        1.. 2
 FAIL  test/e2e/parameterized/parameterized.test.js
  ● parameterized tests › it_each

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 1,
        "passes": 3,
        "pending": 0,
        "suites": 1,
    -   "tests": 3,
    +   "tests": 4,
      }

       5 |         let results = await rocaInDir(__dirname, "it_each");
       6 |
    >  7 |         expect(results.stats).toMatchObject({
         |                               ^
       8 |             suites: 1,
       9 |             tests: 3,
      10 |             passes: 3,

      at Object.<anonymous> (test/e2e/parameterized/parameterized.test.js:7:31)

  ● parameterized tests › fit_each

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 1,
        "passes": 3,
        "pending": 0,
        "suites": 1,
    -   "tests": 3,
    +   "tests": 4,
      }

      23 |         let results = await rocaInDir(__dirname, "fit_each");
      24 |
    > 25 |         expect(results.stats).toMatchObject({
         |                               ^
      26 |             suites: 1,
      27 |             tests: 3,
      28 |             passes: 3,

      at Object.<anonymous> (test/e2e/parameterized/parameterized.test.js:25:31)

  ● parameterized tests › xit_each

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 1,
        "passes": 1,
        "pending": 3,
        "suites": 1,
    -   "tests": 4,
    +   "tests": 5,
      }

      41 |         let results = await rocaInDir(__dirname, "xit_each");
      42 |
    > 43 |         expect(results.stats).toMatchObject({
         |                               ^
      44 |             suites: 1,
      45 |             tests: 4,
      46 |             passes: 1,

      at Object.<anonymous> (test/e2e/parameterized/parameterized.test.js:43:31)

    1.. 3
        1.. 2
    1.. 1
        1.. 1
            1.. 2
1.. 2
 FAIL  test/e2e/assert/assert.test.js
  ● assert › mock-function-calls

    expect(received).toMatchObject(expected)

    - Expected  - 9
    + Received  + 9

      Array [
        Object {
    -     "fullTitle": "hasBeenCalled success",
    +     "fullTitle": "hasBeenCalled 1 - success",
        },
        Object {
    -     "fullTitle": "hasBeenCalledTimes success 0",
    +     "fullTitle": "hasBeenCalledTimes success 1 - 0",
        },
        Object {
    -     "fullTitle": "hasBeenCalledTimes success 1",
    +     "fullTitle": "hasBeenCalledTimes success 2 - 1",
        },
        Object {
    -     "fullTitle": "hasBeenCalledTimes success 10",
    +     "fullTitle": "hasBeenCalledTimes success 3 - 10",
        },
        Object {
    -     "fullTitle": "hasBeenCalledWith success no args",
    +     "fullTitle": "hasBeenCalledWith success 1 - no args",
        },
        Object {
    -     "fullTitle": "hasBeenCalledWith success primitive arg",
    +     "fullTitle": "hasBeenCalledWith success 2 - primitive arg",
        },
        Object {
    -     "fullTitle": "hasBeenCalledWith success complex arg",
    +     "fullTitle": "hasBeenCalledWith success 3 - complex arg",
        },
        Object {
    -     "fullTitle": "hasBeenCalledWith success multiple args",
    +     "fullTitle": "hasBeenCalledWith success 4 - multiple args",
        },
        Object {
    -     "fullTitle": "hasBeenCalledWith success multiple calls",
    +     "fullTitle": "hasBeenCalledWith success 5 - multiple calls",
        },
      ]

       5 |         let results = await rocaInDir(__dirname, "mock-function-calls");
       6 |
    >  7 |         expect(results.passes).toMatchObject([
         |                                ^
       8 |             { fullTitle: "hasBeenCalled success" },
       9 |             { fullTitle: "hasBeenCalledTimes success 0" },
      10 |             { fullTitle: "hasBeenCalledTimes success 1" },

      at Object.<anonymous> (test/e2e/assert/assert.test.js:7:32)

    1.. 5
        1.. 4
1.. 1
 FAIL  test/e2e/simple-suites/simple-suites.test.js
  ● simple-suites › single-level

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 1,
    +   "failures": 2,
        "passes": 1,
        "pending": 1,
        "suites": 1,
    -   "tests": 3,
    +   "tests": 4,
      }

       5 |         let results = await rocaInDir(__dirname, "single-level");
       6 |
    >  7 |         expect(results.stats).toMatchObject({
         |                               ^
       8 |             suites: 1,
       9 |             tests: 3,
      10 |             passes: 1,

      at Object.<anonymous> (test/e2e/simple-suites/simple-suites.test.js:7:31)

  ● simple-suites › nested

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 5,
        "passes": 11,
        "pending": 0,
    -   "tests": 11,
    +   "tests": 16,
      }

      21 |         let results = await rocaInDir(__dirname, "nested");
      22 |
    > 23 |         expect(results.stats).toMatchObject({
         |                               ^
      24 |             tests: 11,
      25 |             passes: 11,
      26 |             pending: 0,

      at Object.<anonymous> (test/e2e/simple-suites/simple-suites.test.js:23:31)

  ● simple-suites › multiple-files

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 3,
        "passes": 4,
        "pending": 0,
    -   "tests": 4,
    +   "tests": 7,
      }

      46 |         let results = await rocaInDir(__dirname, "multiple-files");
      47 |
    > 48 |         expect(results.stats).toMatchObject({
         |                               ^
      49 |             tests: 4,
      50 |             passes: 4,
      51 |             pending: 0,

      at Object.<anonymous> (test/e2e/simple-suites/simple-suites.test.js:48:31)

    1.. 4
    1.. 2
        1.. 1
        1.. 2
            1.. 1
 FAIL  test/e2e/before-after/before-after.test.js
  ● before-after › before-each

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 5,
        "passes": 13,
        "pending": 4,
        "suites": 10,
    -   "tests": 17,
    +   "tests": 22,
      }

       5 |         let results = await rocaInDir(__dirname, "before-each");
       6 |
    >  7 |         expect(results.stats).toMatchObject({
         |                               ^
       8 |             suites: 10,
       9 |             tests: 17,
      10 |             passes: 13,

      at Object.<anonymous> (test/e2e/before-after/before-after.test.js:7:31)

  ● before-after › after-each

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 6,
        "passes": 14,
        "pending": 4,
        "suites": 10,
    -   "tests": 18,
    +   "tests": 24,
      }

      36 |         let results = await rocaInDir(__dirname, "after-each");
      37 |
    > 38 |         expect(results.stats).toMatchObject({
         |                               ^
      39 |             suites: 10,
      40 |             tests: 18,
      41 |             passes: 14,

      at Object.<anonymous> (test/e2e/before-after/before-after.test.js:38:31)

  ● before-after › mixed

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 4,
        "passes": 9,
        "pending": 3,
        "suites": 4,
    -   "tests": 12,
    +   "tests": 16,
      }

      71 |         let results = await rocaInDir(__dirname, "mixed");
      72 |
    > 73 |         expect(results.stats).toMatchObject({
         |                               ^
      74 |             suites: 4,
      75 |             tests: 12,
      76 |             passes: 9,

      at Object.<anonymous> (test/e2e/before-after/before-after.test.js:73:31)

 FAIL  test/e2e/selection/selection.test.js
  ● selection › fdescribe

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 2,
        "passes": 3,
        "pending": 0,
        "suites": 9,
    -   "tests": 3,
    +   "tests": 5,
      }

       5 |         let results = await rocaInDir(__dirname, "fdescribe");
       6 |
    >  7 |         expect(results.stats).toMatchObject({
         |                               ^
       8 |             suites: 9,
       9 |             tests: 3,
      10 |             passes: 3,

      at Object.<anonymous> (test/e2e/selection/selection.test.js:7:31)

  ● selection › xdescribe

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 3,
        "passes": 3,
        "pending": 3,
        "suites": 13,
    -   "tests": 6,
    +   "tests": 9,
      }

      23 |         let results = await rocaInDir(__dirname, "xdescribe");
      24 |
    > 25 |         expect(results.stats).toMatchObject({
         |                               ^
      26 |             suites: 13,
      27 |             tests: 6,
      28 |             passes: 3,

      at Object.<anonymous> (test/e2e/selection/selection.test.js:25:31)

  ● selection › fit

    expect(received).toMatchObject(expected)

    - Expected  - 1
    + Received  + 1

      Array [
        Object {
    -     "fullTitle": "root 1 suite 2 case 2.1",
    +     "fullTitle": "root 1 suite 2 1 - case 2.1",
        },
      ]

      48 |         });
      49 |
    > 50 |         expect(results.passes).toMatchObject([
         |                                ^
      51 |             { fullTitle: "root 1 suite 2 case 2.1" },
      52 |         ]);
      53 |     });

      at Object.<anonymous> (test/e2e/selection/selection.test.js:50:32)

  ● selection › xit

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 5,
        "passes": 7,
        "pending": 1,
    -   "tests": 8,
    +   "tests": 13,
      }

      56 |         let results = await rocaInDir(__dirname, "xit");
      57 |
    > 58 |         expect(results.stats).toMatchObject({
         |                               ^
      59 |             tests: 8,
      60 |             passes: 7,
      61 |             pending: 1,

      at Object.<anonymous> (test/e2e/selection/selection.test.js:58:31)

  ● selection › mixed

    expect(received).toMatchObject(expected)

    - Expected  - 2
    + Received  + 2

      Object {
    -   "failures": 0,
    +   "failures": 2,
        "passes": 1,
        "pending": 2,
    -   "tests": 3,
    +   "tests": 5,
      }

      77 |         let results = await rocaInDir(__dirname, "mixed");
      78 |
    > 79 |         expect(results.stats).toMatchObject({
         |                               ^
      80 |             tests: 3,
      81 |             passes: 1,
      82 |             pending: 2,

      at Object.<anonymous> (test/e2e/selection/selection.test.js:79:31)

Test Suites: 5 failed, 2 passed, 7 total
Tests:       15 failed, 18 passed, 33 total
Snapshots:   0 total
Time:        2.739 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "test" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@Nowele Nowele changed the title HULUROKU-6968 - update to rokucommunity/brs version 0.45.0 HULUROKU-6968 - update to rokucommunity/brs version 0.47.0 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants