11"use strict" ;
2+ var __assign = ( this && this . __assign ) || Object . assign || function ( t ) {
3+ for ( var s , i = 1 , n = arguments . length ; i < n ; i ++ ) {
4+ s = arguments [ i ] ;
5+ for ( var p in s ) if ( Object . prototype . hasOwnProperty . call ( s , p ) )
6+ t [ p ] = s [ p ] ;
7+ }
8+ return t ;
9+ } ;
210Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
311var describeInteractionProp_1 = require ( "../describeInteractionProp" ) ;
412var describeOptionalProp_1 = require ( "../describeOptionalProp" ) ;
@@ -9,13 +17,19 @@ var validData = {};
917var correctResponsesPattern = collection_1 . default ( factory_1 . stringValue ) ;
1018exports . default = function ( test ) {
1119 itsInvalid_1 . default ( 10 , 'not an object' , test ) ;
20+ itsInvalid_1 . default ( {
21+ type : 'http://adlnet.gov/expapi/activities/cmi.interaction' ,
22+ correctResponsesPattern : [
23+ 'Bob\'s your uncle'
24+ ]
25+ } , 'Missing interactionType' , test ) ;
1226 describeOptionalProp_1 . default ( 'name' , factory_1 . languageMap , validData , test ) ;
1327 describeOptionalProp_1 . default ( 'description' , factory_1 . languageMap , validData , test ) ;
1428 describeOptionalProp_1 . default ( 'type' , factory_1 . iri , validData , test ) ;
1529 describeOptionalProp_1 . default ( 'moreInfo' , factory_1 . iri , validData , test ) ;
1630 describeOptionalProp_1 . default ( 'extensions' , factory_1 . extensions , validData , test ) ;
1731 describeOptionalProp_1 . default ( 'interactionType' , factory_1 . interactionType , validData , test ) ;
18- describeOptionalProp_1 . default ( 'correctResponsesPattern' , correctResponsesPattern , validData , test ) ;
32+ describeOptionalProp_1 . default ( 'correctResponsesPattern' , correctResponsesPattern , __assign ( { } , validData , { type : 'http://adlnet.gov/expapi/activities/cmi.interaction' , interactionType : 'fill-in' } ) , test ) ;
1933 describeInteractionProp_1 . default ( [ 'choices' ] , 'choice' , test ) ;
2034 describeInteractionProp_1 . default ( [ 'choices' ] , 'sequencing' , test ) ;
2135 describeInteractionProp_1 . default ( [ 'scale' ] , 'likert' , test ) ;
0 commit comments