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

EventSource properties are not configured properly #2948

Closed
KhafraDev opened this issue Mar 12, 2024 · 6 comments
Closed

EventSource properties are not configured properly #2948

KhafraDev opened this issue Mar 12, 2024 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@KhafraDev
Copy link
Member

KhafraDev commented Mar 12, 2024

'use strict'

const { test } = require('node:test')
const assert = require('node:assert')
const { EventSource } = require('../..') // assuming the test is in test/eventsource/

test('EventSource.prototype properties are configured correctly', () => {
    const props = Object.entries(Object.getOwnPropertyDescriptors(EventSource.prototype))

    for (const [key, value] of props) {
        if (key !== 'constructor') {
            assert(value.enumerable, `${key} is not enumerable`)
        }
    }
})
@KhafraDev KhafraDev added bug Something isn't working good first issue Good for newcomers labels Mar 12, 2024
@Ayush9026
Copy link

/assign @Ayush9026

@Uzlopak
Copy link
Contributor

Uzlopak commented Mar 14, 2024

We dont have a bot. But we have a no cookie licking policy. If you want to provide a PR, then just provide it.

@Ayush9026
Copy link

Thanks @Uzlopak for telling i will raise PR.

@mertcanaltin
Copy link
Member

If you need any help at all, please don't hesitate @Ayush9026 🚀

@MattBidewell
Copy link
Contributor

Out of curiosity and probably a silly question! - why do we want the fields to be enumerable?

Just raised a PR here - #2987

Let me know if I've missed anything off, I've assumed no documentation changes are needed.

@KhafraDev
Copy link
Member Author

Out of curiosity and probably a silly question! - why do we want the fields to be enumerable?

It's part of the webidl spec that's a little too complex for me to give an easy answer for.

@Uzlopak Uzlopak closed this as completed Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants