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

[Fix] energeek.cl #2515

Merged
merged 6 commits into from
Dec 21, 2024
Merged

[Fix] energeek.cl #2515

merged 6 commits into from
Dec 21, 2024

Conversation

BellezaEmporium
Copy link
Contributor

Small change for the image covers, thus fixing the tests.

Copy link
Collaborator

@freearhey freearhey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failed:

npm test -- energeek.cl

> test
> run-script-os energeek.cl


> test:default
> TZ=Pacific/Nauru npx jest --runInBand energeek.cl

 FAIL  sites/energeek.cl/energeek.cl.test.js
  ✓ can generate valid url (3 ms)
  ✕ can parse response (91 ms)
  ✓ can handle empty guide (1 ms)

  ● can parse response

    expect(received).toMatchObject(expected)

    - Expected  - 1
    + Received  + 1

      Object {
        "description": "Kirika Yuumura es una adolescente japonesa que no recuerda nada de su pasado, salvo la palabra NOIR, por lo que decidirá contactar con Mireille Bouquet, una asesina profesional para que la ayude a investigar. Ambas forman un equipo muy eficiente, que resuelve un trabajo tras otro con gran éxito, hasta que aparece un grupo conocido como \"Les Soldats\", relacionados con el pasado de Kirika. Estos tratarán de eliminar a las dos chicas, antes de que indaguen más hondo sobre la verdad acerca de Noir",
    -   "icon": "https://pics.filmaffinity.com/nowaru_noir_tv_series-225888552-mmed.jpg",
    +   "icon": undefined,
        "start": "2022-11-29T03:00:00.000Z",
        "stop": "2022-11-29T03:30:00.000Z",
        "title": "Noir",
      }

      22 |   let results = parser({ content, channel, date })
      23 |
    > 24 |   expect(results[0]).toMatchObject({
         |                      ^
      25 |     start: '2022-11-29T03:00:00.000Z',
      26 |     stop: '2022-11-29T03:30:00.000Z',
      27 |     title: 'Noir',

      at Object.<anonymous> (sites/energeek.cl/energeek.cl.test.js:24:22)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 2 passed, 3 total
Snapshots:   0 total
Time:        2.941 s
Ran all test suites matching /energeek.cl/i.

@BellezaEmporium
Copy link
Contributor Author

Seems that it depends on whatever they put on "icon". Sometimes it has "src", sometimes it doesn't... Will make a coerce.

freearhey
freearhey previously approved these changes Dec 18, 2024
@freearhey
Copy link
Collaborator

Actually your first version of the code was correct, the error occurred only because an old version of epg-parser was used.

@PopeyeTheSai10r
Copy link
Collaborator

Test failed

npm test -- energeek.cl

> test
> run-script-os energeek.cl


> test:win32
> SET "TZ=Pacific/Nauru" && npx jest --runInBand energeek.cl

 FAIL  sites/energeek.cl/energeek.cl.test.js (11.636 s)
  √ can generate valid url (11 ms)
  × can parse response (340 ms)
  √ can handle empty guide (4 ms)

  ● can parse response

    expect(received).toMatchObject(expected)

    - Expected  - 1
    + Received  + 1

      Object {
        "description": "Kirika Yuumura es una adolescente japonesa que no recuerda nada de su pasado, salvo la palabra NOIR, por lo que decidirá contactar con Mireille Bouquet, una asesina profesional para que la ayude a investigar. Ambas forman un equipo muy eficiente, que resuelve un trabajo tras otro con gran éxito, hasta que aparece un grupo conocido como \"Les Soldats\", relacionados con el pasado de Kirika. Estos tratarán de eliminar a las dos chicas, antes de que indaguen más hondo sobre la verdad acerca de Noir",
    -   "icon": "https://pics.filmaffinity.com/nowaru_noir_tv_series-225888552-mmed.jpg",
    +   "icon": undefined,
        "start": "2022-11-29T03:00:00.000Z",
        "stop": "2022-11-29T03:30:00.000Z",
        "title": "Noir",
      }

      22 |   let results = parser({ content, channel, date })
      23 |
    > 24 |   expect(results[0]).toMatchObject({
         |                      ^
      25 |     start: '2022-11-29T03:00:00.000Z',
      26 |     stop: '2022-11-29T03:30:00.000Z',
      27 |     title: 'Noir',

      at Object.<anonymous> (sites/energeek.cl/energeek.cl.test.js:24:22)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 2 passed, 3 total
Snapshots:   0 total
Time:        12.325 s
Ran all test suites matching /energeek.cl/i.

@freearhey
Copy link
Collaborator

@PopeyeTheSai10r try updating dependencies before running the test:

npm install

@BellezaEmporium
Copy link
Contributor Author

Ah yes, i've tried to merge the new changes with Arhey's latest additions. Most of the fixes I have were based on the "Patch 2024.12.1" PR (and then afterwards on master).

@PopeyeTheSai10r
Copy link
Collaborator

That worked.

npm install

> postinstall
> npm run api:load


> api:load
> npx tsx scripts/commands/api/load.ts

channels.json      [====================================] 100.00% | ETA: 0s | 1.7 MB | 1.6 MB/s
countries.json     [====================================] 100.00% | ETA: 0s | 4.3 KB | N/A
regions.json       [====================================] 100.00% | ETA: 0s | 2.2 KB | N/A
subdivisions.json  [====================================] 100.00% | ETA: 0s | 36.6 KB | N/A

changed 1 package, and audited 796 packages in 24s

127 packages are looking for funding
  run `npm fund` for details

1 critical severity vulnerability

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.


npm test -- energeek.cl

> test
> run-script-os energeek.cl


> test:win32
> SET "TZ=Pacific/Nauru" && npx jest --runInBand energeek.cl

 PASS  sites/energeek.cl/energeek.cl.test.js (10.494 s)
  √ can generate valid url (11 ms)
  √ can parse response (368 ms)
  √ can handle empty guide (3 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        11.25 s, estimated 12 s
Ran all test suites matching /energeek.cl/i.

@PopeyeTheSai10r PopeyeTheSai10r merged commit c108aa5 into master Dec 21, 2024
@PopeyeTheSai10r PopeyeTheSai10r deleted the BellezaEmporium-patch-2 branch December 21, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants