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

[OVERALL] Maintenance update #2390

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

[OVERALL] Maintenance update #2390

wants to merge 3 commits into from

Conversation

BellezaEmporium
Copy link
Contributor

@BellezaEmporium BellezaEmporium commented Jun 24, 2024

  • Update dependencies
  • Fix osn.com
  • Ditch the use of lodash for native JS/ESM.
  • If we use yarn, either remove package-lock.json, or yarn.lock (if we use NPM). Mixing both of them is not a best practice.

Overall maintenance of the EPG repository.

@BellezaEmporium BellezaEmporium marked this pull request as draft June 24, 2024 12:09
@BellezaEmporium BellezaEmporium marked this pull request as ready for review August 6, 2024 17:33
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.

Multiple tests failed:

sites/reportv.com.ar/reportv.com.ar.test.js
  ● can parse response

    expect(received).toMatchObject(expected)

    Matcher error: received value must be a non-null object

    Received has value: undefined

      70 |   })
      71 |
    > 72 |   expect(results[0]).toMatchObject({
         |                      ^
      73 |     start: '2022-10-03T04:00:00.000Z',
      74 |     stop: '2022-10-03T05:00:00.000Z',
      75 |     title: '¿Quién tiene la razón?',

      at Object.<anonymous> (sites/reportv.com.ar/reportv.com.ar.test.js:72:22)
sites/tvmusor.hu/tvmusor.hu.test.js
  ● can parse response

    expect(received).toMatchObject(expected)

    - Expected  - 6
    + Received  + 6

      Object {
    -   "category": "sportműsor",
    -   "description": "Forma-1 magazin. Hírek, információk, érdekességek a Forma-1 világából.",
    -   "icon": "http://www.tvmusor.hu/images/events/408/f1e45193930943d9ee29769e0afa902aff0e4a90-better-call-saul.jpg",
    -   "start": "2022-11-18T23:30:00.000Z",
    -   "stop": "2022-11-19T00:55:00.000Z",
    -   "title": "Rövidpályás Úszó Országos Bajnokság",
    +   "category": undefined,
    +   "description": undefined,
    +   "icon": null,
    +   "start": "2024-09-07T18:10:16.864Z",
    +   "stop": "2024-09-07T18:10:16.864Z",
    +   "title": undefined,
      }

      42 |   })
      43 |
    > 44 |   expect(results[0]).toMatchObject({
         |                      ^
      45 |     start: '2022-11-18T23:30:00.000Z',
      46 |     stop: '2022-11-19T00:55:00.000Z',
      47 |     title: 'Rövidpályás Úszó Országos Bajnokság',

      at Object.<anonymous> (sites/tvmusor.hu/tvmusor.hu.test.js:44:22)
sites/programme-tv.net/programme-tv.net.test.js
  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    /Users/Arhey/Code/iptv-org/epg/node_modules/srcset/index.js:82
    export function parseSrcset(string, {strict = false} = {}) {
    ^^^^^^

    SyntaxError: Unexpected token 'export'

      1 | const durationParser = require('parse-duration')
      2 | const cheerio = require('cheerio')
    > 3 | const srcset = require('srcset')
        |                ^
      4 | const dayjs = require('dayjs')
      5 | const utc = require('dayjs/plugin/utc')
      6 | const timezone = require('dayjs/plugin/timezone')

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)
      at Object.<anonymous> (sites/programme-tv.net/programme-tv.net.config.js:3:16)
      at Object.<anonymous> (sites/programme-tv.net/programme-tv.net.test.js:1:34)

@BellezaEmporium
Copy link
Contributor Author

Ah, I might have forgot to also modify the tests to fit the new structure. Bear with me while I do that.

@BellezaEmporium BellezaEmporium marked this pull request as draft September 8, 2024 12:21
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.

2 participants