sdk-javascript/test/integration
Lance Ball 62cb186657
fix: do not modify incoming event's specversion
Even if the specversion is totally invalid, we should not change the value
received in an incoming `Message`. Previously we defaulted to 1.0 if we did
not recognize the version number. This commit changes that, leaving the value
unmodified. We default to parsing this mystery event with the 1.0 spec. When
the event is validated with `event.validate()` we return `false`.

One additional small change to eliminate a prettier warning about `parer`
being previously declared.

Fixes: https://github.com/cloudevents/sdk-javascript/issues/332
Fixes: https://github.com/cloudevents/sdk-javascript/issues/333

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-21 11:59:00 -04:00
..
ce.png fix: do not alter an event's data attribute (#344) 2020-10-06 08:20:54 -04:00
cloud_event_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
constants_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
emitter_factory_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
emitter_singleton_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
message_test.ts fix: do not modify incoming event's specversion 2021-05-21 11:59:00 -04:00
parser_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
sdk_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
spec_1_tests.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
spec_03_tests.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00
utilities_test.ts chore: add copyrights header and lint rules (#418) 2021-05-14 09:28:49 -04:00