@@ -3098,12 +3098,36 @@ describe('R3 template transform', () => {
30983098 ) ;
30993099 } ) ;
31003100
3101+ // TODO(v23): Enable this breaking change
3102+ xit ( 'should report an error for class bindings on ng-container' , ( ) => {
3103+ const template = `<ng-container [class.foo]="true"></ng-container>` ;
3104+ const errors = parse ( template , { ignoreError : true } ) . errors ;
3105+ expect ( errors . length ) . toBe ( 1 ) ;
3106+ expect ( errors [ 0 ] . msg ) . toBe ( 'Class bindings are not supported on ng-container.' ) ;
3107+ } ) ;
3108+
3109+ // TODO(v23): Enable this breaking change
3110+ xit ( 'should report an error for [class] property bindings on ng-container' , ( ) => {
3111+ const template = `<ng-container [class]="'my-class'"></ng-container>` ;
3112+ const errors = parse ( template , { ignoreError : true } ) . errors ;
3113+ expect ( errors . length ) . toBe ( 1 ) ;
3114+ expect ( errors [ 0 ] . msg ) . toBe ( 'Class bindings are not supported on ng-container.' ) ;
3115+ } ) ;
3116+
31013117 it ( 'should not report an error on non-attr bindings on ng-container' , ( ) => {
31023118 const template = `<ng-container *ngIf"test" [ngTemplateOutlet]="foo"></ng-container>` ;
31033119 const errors = parse ( template , { ignoreError : true } ) . errors ;
31043120 expect ( errors . length ) . toBe ( 0 ) ;
31053121 } ) ;
31063122
3123+ // TODO(v23): Enable this breaking change
3124+ xit ( 'should report an error for class interpolation on ng-container' , ( ) => {
3125+ const template = `<ng-container class="{{foo}}"></ng-container>` ;
3126+ const errors = parse ( template , { ignoreError : true } ) . errors ;
3127+ expect ( errors . length ) . toBe ( 1 ) ;
3128+ expect ( errors [ 0 ] . msg ) . toBe ( 'Class bindings are not supported on ng-container.' ) ;
3129+ } ) ;
3130+
31073131 describe ( '@content blocks' , ( ) => {
31083132 it ( 'should parse a valid @content block' , ( ) => {
31093133 expectFromHtml ( `
0 commit comments