> cfn-lint@0.0.0 test /home/circleci/cfn-lint > mocha lib/test api validateFile ✓ should validate a file (81ms) ✓ should pass properties (80ms) ✓ should pass pseudo-parameters (46ms) ✓ should reset validator state (53ms) validateJsonObject ✓ should validate an object (45ms) docs ✓ resource type ✓ resource type property ✓ parameter type ✓ parameter type property index CLI - functional tests ✓ no parameters (129ms) ✓ missing file parameter (136ms) ✓ validate simple yaml (301ms) ✓ validate parameter flag (308ms) ✓ validate importValue flag (296ms) ✓ validate numeric importValue flag (293ms) ✓ validate pseudo flag (289ms) ✓ validate pseudo + parameter flag (300ms) ✓ invalid pseudo flag throws 2 critical error (290ms) ✓ guess-parameters should explicitely opt in to parameter mocking (286ms) ✓ no-guess-parameters throws errors if we leave out parameters (332ms) ✓ only-guess-parameters should allow opting in to parameter mocking (297ms) ✓ only-guess-parameters should allow opting in to parameter mocking with multiple params (296ms) ✓ handle validation exceptions - non-verbose (234ms) ✓ handle validation exceptions - verbose (262ms) ✓ parameters of the CommaDelimitedList type should accept lists as values (322ms) ✓ parameters of the List type should accept lists as values (310ms) CLI - unit tests ✓ custom resource attribute parameter should accept an arbitrary attribute value using resource-type notation (148ms) ✓ custom resource attribute parameter should accept an arbitrary attribute value using logical-name notation (47ms) ✓ custom resource attribute parameter should accept an arbitrary attribute value using mixed notation parser openFile ✓ valid yaml should return valid javascript object ✓ valid yaml with shorthand should return valid javascript object ✓ valid yaml !GetAtt as array should return valid javascript object ✓ invalid yaml should throw an Error ✓ invalid json should throw an Error ✓ invalid file path should throw an Error resourceSpec getType ✓ should return a resource type ✓ should return a property type ✓ should throw for invalid type isValidProperty ✓ should return True for AWS::Lambda::Function > Code ✓ should return False for AWS::Lambda::Function > MyCode ✓ should throw for AWS::Lambda::InvalidFunction > Code isRequiredProperty ✓ should return True for AWS::IAM::User.Policy > PolicyName ✓ should return True for AWS::Lambda::Function > Code ✓ should return False for AWS::Lambda::Function > Description ✓ should throw for AWS::Lambda::InvalidFunction > Description isSinglePrimitivePropertyType ✓ should return True for AWS::Lambda::Function > Description ✓ should return False for AWS::Lambda::Function > Code ✓ should return False for AWS::Lambda::InvalidFunction > Code isArnProperty ✓ should return True for KmsKeyArn ✓ should return True for TopicArn ✓ should return False for Code getRefOverride ✓ should return "arn" for AWS::ECS::Service ✓ should return null for AWS::Lambda::Function getResourceTypeAttribute ✓ should return "String" for AWS::ECS::Service attribute Name ✓ should return "List of String" for AWS::Route53::HostedZone attribute NameServers ✓ should throw NoSuchResourceTypeAttribute for any attrbute on a type with no attributes ✓ should throw NoSuchResourceTypeAttribute for an attrbute that does not exist on a type type utilities isParameterizedTypeFormat ✓ should recognize a non-parameterized Resource-type ✓ should recognize a non-parameterized Property-type ✓ should recognize a parameterized Resource-type ✓ should recognize a parameterized Property-type ✓ should recognize a parameterized Resource-type, with nested parameterization ✓ should recognize a parameterized Property-type, with nested parameterization getParameterizedTypeArgument ✓ should throw an error if the provided Resource-type is not parameterized ✓ should throw an error if the provided Property-type is not parameterized ✓ should return the argument of a parameterized Resource-type ✓ should return the argument of a parameterized Property-type ✓ should return the argument of a parameterized Resource-type, with nested parameterization ✓ should return the argument of a parameterized Property-type, with nested parameterization getParameterizedTypeName ✓ should throw an error if the provided Resource-type is not parameterized ✓ should throw an error if the provided Property-type is not parameterized ✓ should return the name of a parameterized Resource-type ✓ should return the name of a parameterized Property-type ✓ should return the name of a parameterized Resource-type, with nested parameterization ✓ should return the name of a parameterized Property-type, with nested parameterization parameterizeTypeFormat ✓ should parameterize a Resource-type that is not already parameterized ✓ should parameterize a Property-type that is not already parameterized ✓ should throw an error if the provided Resource-type is already parameterized and sub-parameterization is disallowed ✓ should throw an error if the provided Property-type is already parameterized and sub-parameterization is disallowed ✓ should parameterize a Resource-type that is already parameterized when sub-parameterization is allowed ✓ should parameterize a Property-type that is already parameterized when sub-parameterization is allowed stripTypeParameters ✓ should be nullipotent on a Resource-type that is not already parameterized ✓ should be nullipotent on a Property-type that is not already parameterized ✓ should strip parameterization of a Resource-type that is parameterized ✓ should strip parameterization of a Property-type that is parameterized ✓ should strip parameterization of a Resource-type that is sub-parameterized ✓ should strip parameterization of a Property-type that is sub-parameterized getPropertyTypeBaseName ✓ should throw an error on a non Property-type ✓ should return the base type of a Property-type ✓ should return the base type of a Property-type that has a parameterized property name ✓ should return the base type of a Property-type that has a parameterized base name ✓ should return the base type of a Property-type that has a sub-parameterized property name ✓ should return the base type of a Property-type that has a sub-parameterized base name getPropertyTypePropertyName ✓ should throw an error on a non Property-type ✓ should return the property name of a Property-type ✓ should return the property name of a Property-type that has a parameterized property name ✓ should return the property name of a Property-type that has a parameterized base name ✓ should return the property name of a Property-type that has a sub-parameterized property name ✓ should return the property name of a Property-type that has a sub-parameterized base name isTypeFormat ✓ should return false for an invalid type ✓ should return true for a valid Resource-type ✓ should return true for a valid Property-type ✓ should return true for a valid Property-type that has a parameterized property name ✓ should return true for a valid Property-type that has a parameterized base name ✓ should return true for a valid Property-type that has a sub-parameterized property name ✓ should return true for a valid Property-type that has a sub-parameterized base name isPropertyTypeFormat ✓ should return false for an invalid type ✓ should return false for a valid Resource-type ✓ should return true for a valid Property-type ✓ should return true for a valid Property-type that has a parameterized property name ✓ should return true for a valid Property-type that has a parameterized base name ✓ should return true for a valid Property-type that has a sub-parameterized property name ✓ should return true for a valid Property-type that has a sub-parameterized base name isResourceTypeFormat ✓ should return false for an invalid type ✓ should return false for a valid Property-type ✓ should return true for a valid Resource-type ✓ should return true for a valid parameterized Resource-type ✓ should return true for a valid sub-parameterized Resource-type ✓ should return false for a valid Property-type that has a parameterized property name ✓ should return false for a valid Property-type that has a parameterized base name ✓ should return false for a valid Property-type that has a sub-parameterized property name ✓ should return false for a valid Property-type that has a sub-parameterized base name rebaseTypeFormat ✓ should return the primitive value type, given a Resource-type and an primitive value type ✓ should return the aggregate type, given a Resource-type and an aggregate type ✓ should be able to form a parameterized aggregate type with a valid Property-type as argument, given a Resource-type and a parameterized aggregate type with a property name as argument ✓ should be able to form a parameterized aggregate type with a valid Property-type as argument, given a Resource-type and a parameterized aggregate type with a Property-type as argument ✓ should be able to form a sub-parameterized aggregate type, given a Resource-type and a sub-parameterized aggregate type with a property name as argument ✓ should be able to form a sub-parameterized aggregate type, given a Resource-type and a sub-parameterized aggregate type with a Property-type as argument ✓ should be able to form a valid Property-type, given a Resource-type and a property name ✓ should be able to form a valid Property-type, given a Resource-type and a Property-type ✓ should be able to form a valid Property-type, given a parameterized Resource-type and a Property-type ✓ should be able to form a valid Property-type, given a Resource-type and a Property-type that has a parameterized base name ✓ should be able to form a valid Property-type, given a Resource-type and a Property-type that has a parameterized argument ✓ should be able to form a valid Property-type, given a Resource-type and a Property-type that has a sub-parameterized argument ✓ should be able to form a sub-parameterized aggregate type, given a Resource-type and a sub-parameterized aggregate type with an argument of Property-type that has a sub-parameterized argument sam2CFN CLI - unit tests ✓ should be able to correctly process valid parameters sam2CFNUtils toAWSPrimitiveTypes ✓ should be able to convert a JSON "number" type to the corresponding CFN types: "Integer", "Long" and "Double" ✓ should be able to convert a JSON "string" type to the corresponding CFN types: "String" and "Timestamp" ✓ should be able to convert a JSON "boolean" type to the corresponding CFN type: "Boolean" ✓ should throw an exception if provided a non-corresponding type buildResourceProperty ✓ should be able to construct a property specification that has a static primitive type and is not required ✓ should be able to construct a property specification that has a static primitive type and is required ✓ should be able to construct a property specification that has a variable type and is not required ✓ should be able to construct a property specification that has a variable type and is required resolveTypeProperties ✓ should be able to resolve type properties from a definition that contains the JSON schema "allOf" operator ✓ should be able to resolve type properties from a definition that contains the JSON schema "anyOf" operator ✓ should be able to resolve type properties from a definition that contains the JSON schema "oneOf" operator ✓ should be able to resolve type properties from a definition that contains a JSON schema with nested operators processDefinition given a SAM schema definition with properties that employ primitive types ✓ should be able to process a SAM schema definition containing a resource type that] has a required primitive property and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required primitive property and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required primitive property ✓ should be able to process a SAM schema definition containing a property type that has a not required primitive property ✓ should be able to process a SAM schema definition containing a resource type that has a required property with variable primitive type and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required property with variable primitive type and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required property with variable primitive type ✓ should be able to process a SAM schema definition containing a property type that has a not required property with variable primitive type given a SAM schema definition with properties that employ structured types ✓ should be able to process a SAM schema definition containing a resource type that has a required structure property and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required structure property and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required structure property ✓ should be able to process a SAM schema definition containing a property type that has a not required structure property ✓ should be able to process a SAM schema definition containing a resource type that has a required property with variable structure type and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required property with variable structure type and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required property with variable structure type ✓ should be able to process a SAM schema definition containing a property type that has a not required property with variable structure type given a SAM schema definition with properties that employ list-type aggregation ✓ should be able to process a SAM schema definition containing a resource type that has a required list-type property and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required list-type property and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required list-type property ✓ should be able to process a SAM schema definition containing a property type that has a not required list-type property ✓ should be able to process a SAM schema definition containing a resource type that has a required property with variable list-type and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required property with variable list-type and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required property with variable list-type ✓ should be able to process a SAM schema definition containing a property type that has a not required property with variable list-type given a SAM schema definition with properties that employ map-type aggregation ✓ should be able to process a SAM schema definition containing a resource type that has a required map-type property and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required map-type property and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required map-type property ✓ should be able to process a SAM schema definition containing a property type that has a not required map-type property ✓ should be able to process a SAM schema definition containing a resource type that has a required property with variable map-type and no additional properties allowed ✓ should be able to process a SAM schema definition containing a resource type that has a not required property with variable map-type and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required property with variable map-type ✓ should be able to process a SAM schema definition containing a property type that has a not required property with variable map-type miscelaneous ✓ should be able to process a SAM schema definition containing a resource type that has a required list-type property which, may contain values of various types, and no additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a not required list-type property which, may contain values of various types ✓ should be able to process a SAM schema definition containing a resource type that has a not required map-type property which, may contain values of various types, and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a required map-type property which, may contain values of various types ✓ should be able to process a SAM schema definition containing a resource type that has a required Json-type property and additional properties allowed ✓ should be able to process a SAM schema definition containing a property type that has a not required Json-type property samResourcesSpecification given a basic SAM JSON specification ✓ should be able to convert it to CFN format ✓ should be able to convert it to CFN format, taking into account custom overrides ✓ should be able to convert it to CFN format, filtering out invalid resource or property types validator validateJsonObject ✓ a valid (1.json) template should return an object with validTemplate = true, no crit errors (52ms) ✓ a valid (2.json) template should return an object with validTemplate = true, no crit errors (50ms) ✓ a valid (3.json) template should return an object with validTemplate = true, no crit errors (54ms) ✓ a valid (4.json) template should return an object with validTemplate = true, no crit errors (49ms) ✓ 2 invalid resource types should return an object with validTemplate = false, 2 crit errors (44ms) ✓ 1 missing parameter type should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 1 invalid parameter type should return an object with validTemplate = false, 1 crit errors (45ms) ✓ missing section resources should return an object with validTemplate = false, 1 crit errors (44ms) ✓ empty section resources should return an object with validTemplate = false, 1 crit errors (43ms) ✓ 1 invalid resource reference should return an object with validTemplate = false, 1 crit errors (45ms) ✓ 1 invalid parameter reference should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 2 invalid Fn::Join's should return an object with validTemplate = false, 2 crit errors (46ms) ✓ 1 invalid Fn::GetAtt should return an object with validTemplate = false, 1 crit errors (45ms) ✓ 1 invalid Fn::FindInMap should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 1 invalid Ref within Parameters should return an object with validTemplate = false, 1 crit errors (49ms) ✓ 1 invalid GetAZs parameter should return an object with validTemplate = false, 1 crit errors (77ms) ✓ 1 reference non AWS::Region GetAZs parameter should return an object with validTemplate = false, 1 warn errors (58ms) Fn::Join ✓ should error if it attempts to join anything but a list of values (42ms) Fn::Select JSON ✓ should pass validation, with flat list and intrinsic list (43ms) ✓ should pass validation with Parameter Collection (42ms) ✓ should error if index is greater than list size (45ms) ✓ should error if second element is not a list or a function (42ms) ✓ should error if first element is not a number or does not parse to a number (42ms) ✓ should error if first element is not defined or is null (42ms) ✓ should error if only one element as argument list (44ms) ✓ should error if second element is null or undefined (42ms) ✓ should error if second element does not resolve to a list (42ms) ✓ should error if first element does not resolve to a number (42ms) ✓ should error if first element attempts an invalid intrinsic function (44ms) ✓ should error if first element is anything other than non-array object, number or string (42ms) ✓ should error if second element attempts an invalid intrinsic function (42ms) ✓ should error if second element contains a list with null values (41ms) Fn::Select YAML ✓ should validate in yaml with literal and intrinic elements in array (44ms) ✓ should validate in yaml with Comma Separated List Param (42ms) ✓ should error if index is greater than list size (42ms) ✓ should error if second element is not a list or a function (42ms) ✓ should error if first element is not a number or does not parse to a number (42ms) ✓ should error if first element is not defined or is null (44ms) ✓ should error if only one element as argument list (43ms) ✓ should error if second element is null or undefined (43ms) ✓ should error if second element does not resolve to a list (43ms) ✓ should error if first element does not resolve to a number (45ms) ✓ should error if first element attempts an invalid intrinsic function (42ms) ✓ should error if first element is anything other than non-array object, number or string (42ms) ✓ should error if second element attempts an invalid intrinsic function (43ms) ✓ should error if second element contains a list with null values (46ms) Fn::Sub ✓ 3 valid Fn::Sub should return an object with validTemplate = true, 0 crit errors (42ms) ✓ a sub referencing an invalid resource should result in validTemplate = false, 1 crit errors, no warnings (42ms) ✓ a sub getatt an invalid resource should result in validTemplate = false, 2 crit errors, no warnings (43ms) ✓ a sub with nested intrinsic values should result in validTemplate = true, 0 crit errors, no warnings (45ms) Fn::ImportValue ✓ 1 invalid Fn::ImportValue should return an object with validTemplate = false, 1 crit errors (43ms) ✓ 1 invalid Fn::ImportValue should return an object with validTemplate = false, 1 crit errors (43ms) ✓ a valid Fn::ImportValue should return an object with validTemplate = true, 0 crit errors (43ms) ✓ an Fn::ImportValue with a correct override should return an object with validTemplate = true, 0 crit errors (44ms) Fn::GetAtt ✓ Fn::GetAtt for an arbitrary attribute on a custom resource should return a mock result (43ms) ✓ should pass validation where !GetAtt returns a list (45ms) ✓ should not pass validation where !GetAtt returns a list (45ms) ✓ should not pass validation with !GetAtt where attribute does not exist (44ms) ✓ should pass validation where !GetAtt returns some unexpected attribute for AWS::CloudFormation::Stack (42ms) ✓ should not pass validation with !GetAtt where the resource does not exist (42ms) conditions ✓ 1 invalid if condition arguments should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 1 invalid if condition should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 1 invalid condition value should return an object with validTemplate = false, 1 crit errors (43ms) ✓ 1 invalid condition value type should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 1 valid condition value type should return an object with validTemplate = true, 0 crit errors (50ms) Fn::Split ✓ should split a basic string ✓ should split a string that doesn't contain the delimiter ✓ should resolve an intrinsic function ✓ should reject a parameter that is an object ✓ should reject a parameter that is a string ✓ should reject a parameter that is an empty array ✓ should reject a parameter that is a single length array ✓ should reject a delimiter that isn't a string validator test { info: [], warn: [], crit: [] } ✓ should have no errors ✓ should resolve a simple split ✓ should resolve a split of a join ✓ should resolve a select of a split templateVersion ✓ 1 invalid template version should return an object with validTemplate = false, 1 crit errors (44ms) ✓ 1 missing template version should return an object with validTemplate = true, 0 crit errors (69ms) propertyValidation ✓ 1 invalid arn property should return an object with validTemplate = false, 1 crit errors (59ms) ✓ 1 invalid property name of ResourceType should return an object with validTemplate = false, 1 crit errors (43ms) ✓ 1 invalid property name of PropertyType should return an object with validTemplate = false, 1 crit errors (45ms) ✓ 1 invalid property name of Tag list should return an object with validTemplate = false, 1 crit errors (43ms) ✓ 1 string property should return an object with validTemplate = false, 1 crit errors (45ms) ✓ 1 missing propertyType property should return an object with validTemplate = false, 1 crit errors (53ms) ✓ 1 missing resourceType property should return an object with validTemplate = false, 1 crit errors (51ms) ✓ 1 missing (via AWS::NoValue) property should return an object with validTemplate = false, 1 crit errors (45ms) ✓ 1 invalid boolean property should return an object with validTemplate = false, 1 crit errors (46ms) ✓ 4 invalid nested properties should return an object with validTemplate = false, 4 crit errors (49ms) ✓ a valid template with a Map property should return an object with validTemplate = true, no crit errors (45ms) ✓ an invalid template with a Map property should return an object with validTemplate = false, 1 crit error (45ms) ✓ a valid (valid_timestamp.yaml) template with a Timestamp should return an objcet with validTemplate = true (51ms) ✓ a (invalid_timestamp.yaml) template with an invalid Timestamp should return an objcet with validTemplate = false, 2 crit errors (54ms) ✓ a valid template with APIG string results in validTemplate = true, 0 crit error (46ms) validateYamlFile ✓ a valid (1.yaml) template should return an object with validTemplate = true, no crit errors (50ms) ✓ a valid (2.yaml) template should return an object with validTemplate = true, no crit errors (55ms) ✓ a valid (valid_minus_one_as_string.yaml) template should return an object with validTemplate = true, no crit errors (42ms) issues ✓ a valid ASG template with Tags property should return an object with validTemplate = true, no crit errors (46ms) ✓ both methods of defining a custom resource should result in validTemplate = true, no crit errors (43ms) ✓ numeric properties should result in validTemplate = true, no crit errors, no warn errors (43ms) ✓ IAM with ManagedPolicyName should result in validTemplate=true, no crit errors, no warn errors (41ms) ✓ Reference to RDS attribute validTemplate=true, no crit errors, no warn errors (42ms) ✓ if condition not working as expected, no crit errors, no warn errors (46ms) ✓ if condition not working as expected, 2 crit errors, no warn errors (42ms) ✓ a list of an extended parameter type should be properly mocked without causing an exception (47ms) ✓ a null property value should not cause an exception (42ms) ✓ Fn::Split should support function "Fn::ImportValue" (63ms) ✓ a template with properties containing nested aggregate types should be validated successfully (169ms) ✓ Issue #214 - SQS Queues now accept Tags (44ms) ✓ Issue #221 - Allow sub with split (42ms) ✓ Issue #212 - Ref does not account for resources that return ARNS (47ms) parameters-validation ✓ an unallowed parameter value provided at runtime gets rejected (42ms) ✓ an allowed parameter value provided at runtime gets allowed (43ms) ✓ an empty parameter value provided at runtime picks up the empty default (which will throw an error) (42ms) ✓ missing parameters should cause an error when guessParameters is set (43ms) ✓ parameters in guessParameters should be permitted to be guessed (42ms) ✓ List should return a list (43ms) ✓ List should return a list (41ms) ✓ List should return a list (42ms) ✓ List should return a list (42ms) ✓ List should return a list (45ms) ✓ List should return a list (42ms) ✓ List should return a list (42ms) ✓ List should return a list (60ms) ✓ List should return a list (66ms) pseudo-parmeters ✓ defining an override for accountId should result in validTemplate = true, no crit errors, no warnings (49ms) ✓ using the pseudo parameter AWS::URLSuffix should result in validTemplate = true, no crit errors, no warnings (43ms) ✓ using the pseudo parameter AWS::Partition should result in validTemplate = true, no crit errors, no warnings (45ms) custom-resource-attributes ✓ should validate using custom resource attribute values for generic and custom types (126ms) ✓ should validate using custom resource attribute values for logical-names (116ms) ✓ should validate using custom resource attribute values for generic-type and logical-name (114ms) ✓ should validate using custom resource attribute values for custom-type and logical-name (117ms) ✓ should validate when a logical-name overrides a resource-type custom attribute value (154ms) output-references ✓ an output referencing an invalid resource should result in validTemplate = false, 1 crit errors, no warnings (42ms) ✓ an output referencing an valid resource should result in validTemplate = true, 0 crit errors, no warnings (44ms) ✓ a template with an exported output missing a Name should result in validTemplate = false, 1 crit error (42ms) a template with an output referencing a resource and a resource attribute ✓ should result in a valid template ✓ should populate errorObject outputs correctly ✓ should populate errorObject exports correctly type checking coverage ✓ should be able to determine the type of every property of every resource (95ms) ✓ should be able to determine the type of every property of every propertytype (194ms) type checking unit tests isObject ✓ {} should be valid ✓ {} should be valid ✓ {} should be valid ✓ 'string' should be invalid ✓ [ 'array' ] should be invalid ✓ 42 should be invalid isList ✓ [ 'a', 'b' ] should be valid ✓ [ 42 ] should be valid ✓ 'string' should be invalid ✓ 42 should be invalid ✓ {} should be invalid isArn ✓ 'arn:aws:region:something' should be valid ✓ 'arn:aws::::' should be valid ✓ 'notarn:aws:region:something' should be invalid ✓ 'not even close' should be invalid ✓ 42 should be invalid ✓ {} should be invalid ✓ [ 'arn:aws:region:something' ] should be invalid isString ✓ 'string' should be valid ✓ 42 should be valid ✓ [ 'asd' ] should be invalid ✓ {} should be invalid isInteger ✓ 123 should be valid ✓ '123' should be valid ✓ '-123' should be valid ✓ '0' should be valid ✓ '-0' should be valid ✓ '00' should be valid ✓ 123.32 should be invalid ✓ '123.32' should be invalid ✓ '-123.32' should be invalid ✓ '123asdf' should be invalid ✓ 'not even close' should be invalid isDouble ✓ 123 should be valid ✓ 123.123 should be valid ✓ '123.123' should be valid ✓ '0' should be valid ✓ '0.0' should be valid ✓ '-123.0' should be valid ✓ '-123' should be valid ✓ '123.32asdf' should be invalid ✓ 'not even close' should be invalid ✓ '123.123.123' should be invalid isBoolean ✓ true should be valid ✓ false should be valid ✓ 'TrUe' should be valid ✓ 'FaLse' should be valid ✓ 'true' should be valid ✓ 'false' should be valid ✓ 'true1' should be invalid ✓ 'y' should be invalid ✓ 1 should be invalid ✓ 0 should be invalid isJson ✓ {} should be valid ✓ { obj: { with: 'values' } } should be valid ✓ '{}' should be valid ✓ '{"obj":{"with":"values"}}' should be valid ✓ [] should be invalid ✓ 'string' should be invalid ✓ '[]' should be invalid ✓ '"string"' should be invalid isTimestamp ✓ '2012-12-30' should be valid ✓ '2012-12-30T20:10' should be valid ✓ '2012-12-30T20:12Z' should be valid ✓ '2012-12-30T20:12:22' should be valid ✓ '2012-12-30T20:12:22+01:00' should be valid ✓ '2012-12-30T20:12:22+0100' should be valid ✓ '2012-12-30T20:12:22-05:00' should be valid ✓ '2012-12-30T20:12:22.222' should be valid ✓ '2012-12-30T20:12:22.222Z' should be valid ✓ '2012-12-30T20:12:22.222222' should be valid ✓ '2012' should be invalid ✓ '2012-12' should be invalid ✓ '2012-12-30T' should be invalid ✓ '2012-12-30T10' should be invalid ✓ '2012-12-30T20:12:22+1' should be invalid ✓ '2012-12-30T20:12:22+100' should be invalid type inference unit tests inferPrimitiveValueType ✓ should be able to infer an Integer value - typeof number ✓ should be able to infer an Integer value - typeof string ✓ should be able to infer a Double value - typeof number ✓ should be able to infer a Double value - typeof string ✓ should be able to infer a Boolean value - typeof boolean ✓ should be able to infer a Boolean value - typeof string ✓ should be able to infer a Json value - typeof object ✓ should be able to infer a Json value - typeof string ✓ should be able to infer a String value ✓ should be able to infer a Timestamp value ✓ should be nullipotent upon input data - typeof number ✓ should be nullipotent upon input data - typeof string ✓ should be nullipotent upon input data - typeof boolean ✓ should be nullipotent upon input data - typeof object inferStructureValueType ✓ should be able to infer a structure value type via Type exact-match ✓ should be able to infer a structure value type via Type partial-match ✓ should be able to infer a structure value type via property-similiarity matching ✓ should not be able to infer a non-structure value type ✓ should be nullipotent upon input data inferAggregateValueType ✓ should be able to infer a List of Strings aggregate value type ✓ should be able to infer a List of Json aggregate value type ✓ should be able to infer a Map of Strings aggregate value type ✓ should be able to infer a Map of Json aggregate value type ✓ should not be able to infer a non-aggregate value type ✓ should be nullipotent upon input data - List of Strings aggregate value type ✓ should be nullipotent upon input data - List of Json aggregate value type ✓ should be nullipotent upon input data - Map of Strings aggregate value type ✓ should be nullipotent upon input data - Map of Json aggregate value type inferValueType ✓ should be able to infer a structure value type ✓ should be able to infer an aggregate value type ✓ should be able to infer a primitive value type templateHasUnresolvedIntrinsics ✓ should be able to detect if a given template has top-level unresolved intrinsics ✓ should be able to detect if a given template has nested unresolved intrinsics ✓ should be able to detect if a given template does not contain unresolved intrinsics SAM-20161031 ✓ a sample AWS template (sam_20161031_alexa_skill.yaml) should validate successfully (279ms) ✓ a sample AWS template (sam_20161031_all_policy_templates.yaml) should validate successfully (178ms) ✓ a sample AWS template (sam_20161031_api_backend.yaml) should validate successfully (942ms) ✓ a sample AWS template (sam_20161031_api_swagger_cors.yaml) should validate successfully (474ms) ✓ a sample AWS template (sam_20161031_cloudwatch_logs.yaml) should validate successfully (282ms) ✓ a sample AWS template (sam_20161031_encryption_proxy.yaml) should validate successfully (603ms) ✓ a sample AWS template (sam_20161031_hello_world.yaml) should validate successfully (167ms) ✓ a sample AWS template (sam_20161031_implicit_api_settings.yaml) should validate successfully (486ms) ✓ a sample AWS template (sam_20161031_inline_swagger.yaml) should validate successfully (372ms) ✓ a sample AWS template (sam_20161031_iot_backend.yaml) should validate successfully (451ms) ✓ a sample AWS template (sam_20161031_lambda_edge.yaml) should validate successfully (182ms) ✓ a sample AWS template (sam_20161031_lambda_safe_deployments.yaml) should validate successfully (313ms) ✓ a sample AWS template (sam_20161031_s3_processor.yaml) should validate successfully (297ms) ✓ a sample AWS template (sam_20161031_schedule.yaml) should validate successfully (337ms) ✓ a sample AWS template (sam_20161031_stream_processor.yaml) should validate successfully (337ms) ✓ a template missing a required property should fail validation (171ms) ✓ a template containing an aggregate-type that has items with different types (sam_20161031_heterogenous_aggregation.yaml) should validate successfully (502ms) ✓ a template containing a valid SAM Globals section should validate successfully (500ms) ✓ a template containing an invalid SAM Globals resource type should fail validation (89ms) ✓ a template containing an invalid SAM Globals property name should fail validation (90ms) ✓ a valid real-world SAM template (sam_20161031_realworld_1.yaml) should validate successfully (548ms) ✓ a invalid APIGateway::Stage.MethodSettings type (sam_20161031_api_methodsettings_not_a_list.yaml) should invalidate successfully (513ms) ✓ a valid APIGateway::Stage.MethodSettings containing incomplete APIGateway::Stage.MethodSetting (sam_20161031_api_methodsettings_missing_required.yaml) should invalidate successfully (465ms) ✓ a valid template with Ref in Globals (sam_20161031_environment_ref.yaml) should validate successfully (89ms) yamlSchema buildYamlSchema ✓ should build a yaml schema functionTag ✓ should work on a Fn::Thing ✓ should work on a Thing buildYamlType ✓ should return a type that builds the JSON representation of the yaml tag ✓ should special-case Fn::GetAtt 470 passing (21s)