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

Add stod2.is #2535

Closed
wants to merge 1 commit into from
Closed

Add stod2.is #2535

wants to merge 1 commit into from

Conversation

fraudiay79
Copy link

Add stod2.is guide

Add stod2.is guide
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 --- stod2.is

> test
> run-script-os stod2.is


> test:default
> TZ=Pacific/Nauru npx jest --runInBand stod2.is

 FAIL  sites/stod2.is/stod2.is.test.js
  ✓ can generate valid url (6 ms)
  ✕ can parse response (11 ms)
  ✕ can handle empty guide

  ● can parse response

    expect(received).toMatchObject(expected)

    - Expected  - 3
    + Received  + 3

      Array [
        Object {
    -     "start": "2024-12-19T08:00:00Z",
    -     "stop": "2024-12-19T08:15:00Z",
    -     "title": "Heimsókn",
    +     "start": "2024-12-19T22:45:16.463Z",
    +     "stop": null,
    +     "title": undefined,
        },
      ]

      15 |   const results = parser({ content })
      16 |
    > 17 |   expect(results).toMatchObject([
         |                   ^
      18 |     {
      19 |       start: '2024-12-19T08:00:00Z',
      20 |       stop: '2024-12-19T08:15:00Z',

      at Object.<anonymous> (sites/stod2.is/stod2.is.test.js:17:19)

  ● can handle empty guide

    SyntaxError: Unexpected end of JSON input
        at JSON.parse (<anonymous>)

      57 |
      58 | function parseItems(content) {
    > 59 |   const data = JSON.parse(content)
         |                     ^
      60 |   if (!data || !Array.isArray(data)) return []
      61 |   return data
      62 | }

      at parseItems (sites/stod2.is/stod2.is.config.js:59:21)
      at parser (sites/stod2.is/stod2.is.config.js:20:19)
      at Object.<anonymous> (sites/stod2.is/stod2.is.test.js:27:19)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 1 passed, 3 total
Snapshots:   0 total
Time:        2.891 s
Ran all test suites matching /stod2.is/i.

@fraudiay79
Copy link
Author

I will create a new pull request

@fraudiay79 fraudiay79 closed this Dec 22, 2024
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