1

My code is here,

// app.component.ts

public TestFairy: TestFairy;

platform.ready().then(() => {
   TestFairy.begin(APP TOKEN);
   ...
});

Its through the Error for TestDairy

yaba06
  • 3
  • 1
Murali
  • 63
  • 6
  • Hi if you included this link /// – Sathyanarayanan Dec 16 '16 at 04:42
  • 1
    I am already included but is not working, Thank you – Murali Dec 16 '16 at 04:45
  • hey. did you manage to make it work ?! I have the same issue with TestFairy variable not being recognised. @Sathyanarayanan .. where to include the reference path ? And why are you using /plugins .. since the library is in node_modules – Scobee Nov 05 '18 at 08:56

2 Answers2

2

Try This

// app.componenet.ts

/// <reference path="../plugins/com.testfairy.cordova-plugin/www/testfairy.d.ts" />

Right after the imports, add the following line to import TestFairy

declare var TestFairy: TestFairy;

Inside the constructor

platform.ready().then(() => {
TestFairy.begin(APP TOKEN);
  ...
});

Please refer this link : https://docs.testfairy.com/Integrations/Cordova.html

Sathyanarayanan
  • 432
  • 3
  • 7
0

See the TestFairy documentation for ionic.

It's also recommended to add this plugin to enable logs on ios 10.x:

ionic plugin add cordova-plugin-console

Thanks, Yuval.

  • While the link you've posted may contain the answer for the OP's question, please include the important information from it in your own answer. Otherwise if the link no longer works, your answer becomes meaningless. – Tom Jan 17 '17 at 13:53
  • The documentation doen't work with the latest version of Ionic – Sytham Oct 21 '17 at 14:13