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

Commit 249c4fa

Browse files
author
Kent C. Dodds
committed
👍 Adding tests for #398
1 parent d0be29f commit 249c4fa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/directives/formly-form.test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,24 @@ describe('formly-form', () => {
149149
expect(() => scope.$digest()).to.not.throw();
150150
});
151151

152+
describe.skip(`ngTransclude element`, () => {
153+
it(`should have the specified className`, () => {
154+
const el = compileAndDigest(`
155+
<formly-form model="model" fields="fields" form="theForm" transclude-class="foo yeah"></formly-form>
156+
`);
157+
expect(el[0].querySelector('.foo.yeah')).to.exist;
158+
});
159+
160+
it(`should not have a className when one is unspecified`, () => {
161+
// this test is to avoid giving it a class of "undefined"
162+
const el = compileAndDigest(`
163+
<formly-form model="model" fields="fields" form="theForm"></formly-form>
164+
`);
165+
const transcludedDiv = el[0].querySelector('div[ng-transclude]');
166+
expect(transcludedDiv.classList).to.have.length(0);
167+
});
168+
});
169+
152170
describe(`fieldGroup`, () => {
153171

154172
beforeEach(() => {

0 commit comments

Comments
 (0)