Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to unit test dialog field js(custom js files for dialog fields) files which has references to granite library

Avatar

Avatar
Validate 1
Level 2
mchag
Level 2

Like

1 like

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
mchag
Level 2

Like

1 like

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
mchag
Level 2

06-04-2018

Hi,

We are implementing the java script unit test case on one of the custom JS file written for text field in component dialog which has references to Granite library as one of its parameters.So, when we are writing test case, it is throwing reference error on Granite variable.

Can somebody suggest us how to reference the out of the box Granite library  while writing java script unit test cases or if anybody has done this kind of implementation please let us know how you have implemented.

 

Following are the libraries we are using to write the test cases

Mocha/Chai, Sinon, JsDom

Thanks,

Madhu

Replies

Avatar

Avatar
Boost 1
Level 1
bhellema
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
bhellema
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile
bhellema
Level 1

06-04-2018

This sounds like a question for the `Adobe Experience Manager` forum, not the `Mobile` forum.