Skip to content

Test run shows pending tests #232

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

Closed
lholmquist opened this issue Jun 29, 2020 · 4 comments
Closed

Test run shows pending tests #232

lholmquist opened this issue Jun 29, 2020 · 4 comments
Labels
good first issue Good for newcomers module/test Issues and changes related to the tests status/no-issue-activity type/question Further information is requested

Comments

@lholmquist
Copy link
Contributor

At the end of a npm run test, there says there is 6 pending tests.

~/develop/cloudevents/sdk-javascript(master) » ./node_modules/mocha/bin/mocha --require ts-node/register test/cloud_event_test.ts


  A CloudEvent
    ✓ Can be constructed with a typed Message
    ✓ serializes as JSON with toString()

  A 1.0 CloudEvent
    ✓ has retreivable source and type attributes
    ✓ defaults to specversion 1.0
    ✓ generates an ID if one is not provided in the constructor
    ✓ can be constructed with an ID
    ✓ generates a timestamp by default
    ✓ can be constructed with a timestamp
    ✓ can be constructed with a datacontenttype
    ✓ can be constructed with a dataschema
    ✓ can be constructed with a subject
    ✓ throws a TypeError when constructed with a schemaurl
    ✓ can be constructed with data
    ✓ can be constructed with extensions
    - throws ValidationError if the CloudEvent does not conform to the schema
    - returns a JSON string even if format is invalid
    - correctly formats a CloudEvent as JSON

  A 0.3 CloudEvent
    ✓ has retreivable source and type attributes
    ✓ generates an ID if one is not provided in the constructor
    ✓ generates a timestamp by default
    ✓ can be constructed with a timestamp
    ✓ can be constructed with a datacontenttype
    ✓ can be constructed with a datacontentencoding
    ✓ can be constructed with a schemaurl
    ✓ can be constructed with a subject
    ✓ throws a TypeError when constructed with a dataschema
    ✓ can be constructed with data
    - throws ValidationError if the CloudEvent does not conform to the schema
    - returns a JSON string even if format is invalid
    - correctly formats a CloudEvent as JSON


  24 passing (11ms)
  6 pending

There are 6 tests here, https://github.com/cloudevents/sdk-javascript/blob/master/test/cloud_event_test.ts#L104 that don't do anything.

Were these just place holders when doing the TS re-write and should be removed? or do they need to be implemented?

@lholmquist lholmquist added the type/question Further information is requested label Jun 30, 2020
@lholmquist
Copy link
Contributor Author

@lance ^^

@lance
Copy link
Member

lance commented Jun 30, 2020

@lholmquist yeah - they were tests that I never implemented in the cut over to TS. There is some overlap with these and other tests in spec_1_tests.ts so I didn't consider it an urgent priority

@lholmquist
Copy link
Contributor Author

sort of what i thought.

@lance lance added good first issue Good for newcomers module/test Issues and changes related to the tests labels Jul 1, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2020

This issue is stale because it has been open 30 days with no activity.

lance added a commit to lance/sdk-javascript that referenced this issue Aug 12, 2020
This commit implements 4 of the 6 pending tests that were not completed
during the TypeScript rewrite. The two tests that were not implemented
were (one for each of v1 and v03):

```
it("returns a JSON string even if format is invalid");
```

I don't really know what that's supposed to be/mean, so I removed them.

Fixes: cloudevents#232

Signed-off-by: Lance Ball <[email protected]>
@lance lance closed this as completed in b5cf886 Aug 12, 2020
lance added a commit that referenced this issue Sep 11, 2020
This commit implements 4 of the 6 pending tests that were not completed
during the TypeScript rewrite. The two tests that were not implemented
were (one for each of v1 and v03):

```
it("returns a JSON string even if format is invalid");
```

I don't really know what that's supposed to be/mean, so I removed them.

Fixes: #232

Signed-off-by: Lance Ball <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers module/test Issues and changes related to the tests status/no-issue-activity type/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants