Skip to content

Test run shows pending tests #232

Closed
Closed

Description

@lholmquist

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?

Activity

  1. lholmquist commented on Jun 30, 2020

    @lholmquist
    ContributorAuthor
  2. lance commented on Jun 30, 2020

    @lance
    Member

    @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

  3. lholmquist commented on Jun 30, 2020

    @lholmquist
    ContributorAuthor

    sort of what i thought.

  4. github-actions commented on Aug 1, 2020

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions