Commit 6499338c authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Added RFC definitions as comments to tests

- To help out folks like @zosman who might want to contribute,
  I've gone ahead and pulled out the definitions for tested
  components and put their ABNF definitions along with its page
  number from the RFC document.
parent 972275e0
Pipeline #918 failed with stage
in 14 seconds
...@@ -94,6 +94,12 @@ describe("Parameter", () => { ...@@ -94,6 +94,12 @@ describe("Parameter", () => {
}); });
describe("STATIC Methods", () => { describe("STATIC Methods", () => {
/**
* iana-token definition from RFC 5545 (pg. 10)
*
* iana-token = 1*(ALPHA / DIGIT / "-")
* ; iCalendar identifier registered with IANA
*/
describe("isIanaToken()", () => { describe("isIanaToken()", () => {
it("exists", () => { it("exists", () => {
expect(Parameter).itself.respondsTo("isIanaToken"); expect(Parameter).itself.respondsTo("isIanaToken");
...@@ -121,6 +127,15 @@ describe("Parameter", () => { ...@@ -121,6 +127,15 @@ describe("Parameter", () => {
}); });
/**
* x-name definition from RFC 5545 (pg. 10)
*
* x-name = "X-" [vendorid "-"] 1*(ALPHA / DIGIT / "-")
* ; Reserved for experimental use.
*
* vendorid = 3*(ALPHA / DIGIT)
* ; Vendor identification
*/
describe("isXName()", () => { describe("isXName()", () => {
it("exists", () => { it("exists", () => {
expect(Parameter).itself.respondsTo("isXName"); expect(Parameter).itself.respondsTo("isXName");
...@@ -161,38 +176,55 @@ describe("Parameter", () => { ...@@ -161,38 +176,55 @@ describe("Parameter", () => {
}); });
}); });
/**
* param-text definition from RFC 5545 (pg. 10)
*
* paramtext = *SAFE-CHAR
*/
describe("isParamText()", () => { describe("isParamText()", () => {
it("exists", () => { it("exists", () => {
expect(Parameter).itself.respondsTo("isParamText"); expect(Parameter).itself.respondsTo("isParamText");
}); });
it("returns ", () => { it("returns true for valid param text", () => {
}); });
}); });
/**
* SAFE-CHAR definition from RFC 5545 (pg. 11)
*
* SAFE-CHAR = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-7E
* / NON-US-ASCII
* ; Any character except CONTROL, DQUOTE, ";", ":", ","
*/
describe("isSafeChar()", () => { describe("isSafeChar()", () => {
it("exists", () => { it("exists", () => {
expect(Parameter).itself.respondsTo("isSafeChar"); expect(Parameter).itself.respondsTo("isSafeChar");
}); });
}); });
/**
* quoted-string definition from RFC 5545 (pg. 11)
*
* quoted-string = DQUOTE *QSAFE-CHAR DQUOTE
*/
describe("isQuotedString()", () => { describe("isQuotedString()", () => {
it("exists", () => { it("exists", () => {
expect(Parameter).itself.respondsTo("isQuotedString"); expect(Parameter).itself.respondsTo("isQuotedString");
}); });
}); });
/**
* QSAFE-CHAR definition from RFC 5545 (pg. 11)
*
* QSAFE-CHAR = WSP / %x21 / %x23-7E / NON-US-ASCII
* ; Any character except CONTROL and DQUOTE
*/
describe("isQSafeChar()", () => { describe("isQSafeChar()", () => {
it("exists", () => { it("exists", () => {
expect(Parameter).itself.respondsTo("isQSafeChar"); expect(Parameter).itself.respondsTo("isQSafeChar");
}); });
}); });
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment