Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit ca6b89e

Browse files
author
Kent C. Dodds
committed
Merge pull request #424 from acsl/master
Added a failing test for #423
2 parents a61de61 + 4130644 commit ca6b89e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/directives/formly-field.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,19 @@ describe('formly-field', function() {
10141014
expect(ctrl.$formatters).to.have.length(2); // ngModel adds one
10151015
expect(ctrl.$viewValue).to.equal('hello! boo!');
10161016
});
1017+
1018+
it.skip(`should format a model value right from the start`, () => {
1019+
scope.model = {myKey: 'hello'};
1020+
scope.fields = [getNewField({
1021+
key: 'myKey',
1022+
formatters: ['"!" + $viewValue + "!"']
1023+
})];
1024+
compileAndDigest();
1025+
1026+
const ctrl = getNgModelCtrl();
1027+
1028+
expect(ctrl.$viewValue).to.equal('!hello!');
1029+
});
10171030
});
10181031

10191032
function testParsersOrFormatters(which) {

0 commit comments

Comments
 (0)