Angular Unit Tests ReferenceError: type is not defined
I'm having some issues with my Unit Tests for an Angular application that is intended to be an Add-In for Outlook.
The code itself runs fine without errors but the tests are routinely failing.
The errors I'm getting are the following:
ReferenceError: Office is not defined
ReferenceError: fabric is not defined
The tests fail on any method that makes use of Office.js or Fabric. So for example if a method was the following:
public getName() {
this.item = Office.context.mailbox.item;
return this.item.from.displayName;
}
It will fail with the error that office is not defined.
Both Office and Fabric are added to the application via the index.html file:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Firefish Outlook Addin</title>
<base href="/AddinClient/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
<script src="assets/js/fabric.js"></script>
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script>
</head>
<body>
<app-root></app-root>
</body>
</html>
And office in particular is initialised in the main.ts file:
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './modules/app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
Office.initialize = function () {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
};
I have been looking online for potential solutions and unfortunately can't find any. My Karma.conf.js file is the following:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
Files: ["https://appsforoffice.microsoft.com/lib/1/hosted/Office.js"],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
and my tsconfig.spec.json file is the following:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node",
"@types/office-js"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts",
"../node_modules/office-ui-fabric-js/src/components/Dropdown/Dropdown.ts",
"../node_modules/office-ui-fabric-js/src/components/Button/Button.ts",
"../node_modules/office-ui-fabric-js/src/components/TextField/TextField.ts",
"../node_modules/office-ui-fabric-js/src/components/RadioButton/RadioButton.ts",
"../node_modules/office-ui-fabric-js/src/components/Spinner/Spinner.ts",
"../node_modules/office-ui-fabric-js/src/components/ProgressIndicator/ProgressIndicator.ts"
]
}
So I'm adding the necessary references to the files for Office and fabric.
Is this a case that I'd need to create mocks of Office and fabric?
angular typescript office-js office-ui-fabric
add a comment |
I'm having some issues with my Unit Tests for an Angular application that is intended to be an Add-In for Outlook.
The code itself runs fine without errors but the tests are routinely failing.
The errors I'm getting are the following:
ReferenceError: Office is not defined
ReferenceError: fabric is not defined
The tests fail on any method that makes use of Office.js or Fabric. So for example if a method was the following:
public getName() {
this.item = Office.context.mailbox.item;
return this.item.from.displayName;
}
It will fail with the error that office is not defined.
Both Office and Fabric are added to the application via the index.html file:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Firefish Outlook Addin</title>
<base href="/AddinClient/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
<script src="assets/js/fabric.js"></script>
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script>
</head>
<body>
<app-root></app-root>
</body>
</html>
And office in particular is initialised in the main.ts file:
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './modules/app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
Office.initialize = function () {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
};
I have been looking online for potential solutions and unfortunately can't find any. My Karma.conf.js file is the following:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
Files: ["https://appsforoffice.microsoft.com/lib/1/hosted/Office.js"],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
and my tsconfig.spec.json file is the following:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node",
"@types/office-js"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts",
"../node_modules/office-ui-fabric-js/src/components/Dropdown/Dropdown.ts",
"../node_modules/office-ui-fabric-js/src/components/Button/Button.ts",
"../node_modules/office-ui-fabric-js/src/components/TextField/TextField.ts",
"../node_modules/office-ui-fabric-js/src/components/RadioButton/RadioButton.ts",
"../node_modules/office-ui-fabric-js/src/components/Spinner/Spinner.ts",
"../node_modules/office-ui-fabric-js/src/components/ProgressIndicator/ProgressIndicator.ts"
]
}
So I'm adding the necessary references to the files for Office and fabric.
Is this a case that I'd need to create mocks of Office and fabric?
angular typescript office-js office-ui-fabric
You have to import the 2 types on test file
– osiris85
Nov 21 '18 at 11:18
in thetests.tsfile, you should add your dependencies. Also, it's a bad practice to use scripts in the head of the index, you should use theangular.jsonfile to import JS scripts.
– trichetriche
Nov 21 '18 at 11:19
add a comment |
I'm having some issues with my Unit Tests for an Angular application that is intended to be an Add-In for Outlook.
The code itself runs fine without errors but the tests are routinely failing.
The errors I'm getting are the following:
ReferenceError: Office is not defined
ReferenceError: fabric is not defined
The tests fail on any method that makes use of Office.js or Fabric. So for example if a method was the following:
public getName() {
this.item = Office.context.mailbox.item;
return this.item.from.displayName;
}
It will fail with the error that office is not defined.
Both Office and Fabric are added to the application via the index.html file:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Firefish Outlook Addin</title>
<base href="/AddinClient/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
<script src="assets/js/fabric.js"></script>
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script>
</head>
<body>
<app-root></app-root>
</body>
</html>
And office in particular is initialised in the main.ts file:
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './modules/app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
Office.initialize = function () {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
};
I have been looking online for potential solutions and unfortunately can't find any. My Karma.conf.js file is the following:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
Files: ["https://appsforoffice.microsoft.com/lib/1/hosted/Office.js"],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
and my tsconfig.spec.json file is the following:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node",
"@types/office-js"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts",
"../node_modules/office-ui-fabric-js/src/components/Dropdown/Dropdown.ts",
"../node_modules/office-ui-fabric-js/src/components/Button/Button.ts",
"../node_modules/office-ui-fabric-js/src/components/TextField/TextField.ts",
"../node_modules/office-ui-fabric-js/src/components/RadioButton/RadioButton.ts",
"../node_modules/office-ui-fabric-js/src/components/Spinner/Spinner.ts",
"../node_modules/office-ui-fabric-js/src/components/ProgressIndicator/ProgressIndicator.ts"
]
}
So I'm adding the necessary references to the files for Office and fabric.
Is this a case that I'd need to create mocks of Office and fabric?
angular typescript office-js office-ui-fabric
I'm having some issues with my Unit Tests for an Angular application that is intended to be an Add-In for Outlook.
The code itself runs fine without errors but the tests are routinely failing.
The errors I'm getting are the following:
ReferenceError: Office is not defined
ReferenceError: fabric is not defined
The tests fail on any method that makes use of Office.js or Fabric. So for example if a method was the following:
public getName() {
this.item = Office.context.mailbox.item;
return this.item.from.displayName;
}
It will fail with the error that office is not defined.
Both Office and Fabric are added to the application via the index.html file:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Firefish Outlook Addin</title>
<base href="/AddinClient/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
<script src="assets/js/fabric.js"></script>
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script>
</head>
<body>
<app-root></app-root>
</body>
</html>
And office in particular is initialised in the main.ts file:
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './modules/app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
Office.initialize = function () {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
};
I have been looking online for potential solutions and unfortunately can't find any. My Karma.conf.js file is the following:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
Files: ["https://appsforoffice.microsoft.com/lib/1/hosted/Office.js"],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
and my tsconfig.spec.json file is the following:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node",
"@types/office-js"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts",
"../node_modules/office-ui-fabric-js/src/components/Dropdown/Dropdown.ts",
"../node_modules/office-ui-fabric-js/src/components/Button/Button.ts",
"../node_modules/office-ui-fabric-js/src/components/TextField/TextField.ts",
"../node_modules/office-ui-fabric-js/src/components/RadioButton/RadioButton.ts",
"../node_modules/office-ui-fabric-js/src/components/Spinner/Spinner.ts",
"../node_modules/office-ui-fabric-js/src/components/ProgressIndicator/ProgressIndicator.ts"
]
}
So I'm adding the necessary references to the files for Office and fabric.
Is this a case that I'd need to create mocks of Office and fabric?
angular typescript office-js office-ui-fabric
angular typescript office-js office-ui-fabric
edited Nov 21 '18 at 12:09
Durga
9,71521030
9,71521030
asked Nov 21 '18 at 11:16
Andrew Ferguson
60110
60110
You have to import the 2 types on test file
– osiris85
Nov 21 '18 at 11:18
in thetests.tsfile, you should add your dependencies. Also, it's a bad practice to use scripts in the head of the index, you should use theangular.jsonfile to import JS scripts.
– trichetriche
Nov 21 '18 at 11:19
add a comment |
You have to import the 2 types on test file
– osiris85
Nov 21 '18 at 11:18
in thetests.tsfile, you should add your dependencies. Also, it's a bad practice to use scripts in the head of the index, you should use theangular.jsonfile to import JS scripts.
– trichetriche
Nov 21 '18 at 11:19
You have to import the 2 types on test file
– osiris85
Nov 21 '18 at 11:18
You have to import the 2 types on test file
– osiris85
Nov 21 '18 at 11:18
in the
tests.ts file, you should add your dependencies. Also, it's a bad practice to use scripts in the head of the index, you should use the angular.json file to import JS scripts.– trichetriche
Nov 21 '18 at 11:19
in the
tests.ts file, you should add your dependencies. Also, it's a bad practice to use scripts in the head of the index, you should use the angular.json file to import JS scripts.– trichetriche
Nov 21 '18 at 11:19
add a comment |
1 Answer
1
active
oldest
votes
So I found out how to resolve this issue.
For fabric since there was a local copy of this we were using I could add a reference to it in the angular.json file under the test section:
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": ["src/assets/js/fabric.js"],
"assets": [
"src/assets"
]
}
}
For the Office issue I put the following in my spec class to get round the issue:
const officeScript = 'https://appsforoffice.microsoft.com/lib/1/hosted/Office.js';
const node = document.createElement('script');
node.src = officeScript;
node.type = 'text/javascript';
node.async = false;
node.charset = 'utf-8';
document.getElementsByTagName('head')[0].appendChild(node);
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410954%2fangular-unit-tests-referenceerror-type-is-not-defined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
So I found out how to resolve this issue.
For fabric since there was a local copy of this we were using I could add a reference to it in the angular.json file under the test section:
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": ["src/assets/js/fabric.js"],
"assets": [
"src/assets"
]
}
}
For the Office issue I put the following in my spec class to get round the issue:
const officeScript = 'https://appsforoffice.microsoft.com/lib/1/hosted/Office.js';
const node = document.createElement('script');
node.src = officeScript;
node.type = 'text/javascript';
node.async = false;
node.charset = 'utf-8';
document.getElementsByTagName('head')[0].appendChild(node);
add a comment |
So I found out how to resolve this issue.
For fabric since there was a local copy of this we were using I could add a reference to it in the angular.json file under the test section:
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": ["src/assets/js/fabric.js"],
"assets": [
"src/assets"
]
}
}
For the Office issue I put the following in my spec class to get round the issue:
const officeScript = 'https://appsforoffice.microsoft.com/lib/1/hosted/Office.js';
const node = document.createElement('script');
node.src = officeScript;
node.type = 'text/javascript';
node.async = false;
node.charset = 'utf-8';
document.getElementsByTagName('head')[0].appendChild(node);
add a comment |
So I found out how to resolve this issue.
For fabric since there was a local copy of this we were using I could add a reference to it in the angular.json file under the test section:
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": ["src/assets/js/fabric.js"],
"assets": [
"src/assets"
]
}
}
For the Office issue I put the following in my spec class to get round the issue:
const officeScript = 'https://appsforoffice.microsoft.com/lib/1/hosted/Office.js';
const node = document.createElement('script');
node.src = officeScript;
node.type = 'text/javascript';
node.async = false;
node.charset = 'utf-8';
document.getElementsByTagName('head')[0].appendChild(node);
So I found out how to resolve this issue.
For fabric since there was a local copy of this we were using I could add a reference to it in the angular.json file under the test section:
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": ["src/assets/js/fabric.js"],
"assets": [
"src/assets"
]
}
}
For the Office issue I put the following in my spec class to get round the issue:
const officeScript = 'https://appsforoffice.microsoft.com/lib/1/hosted/Office.js';
const node = document.createElement('script');
node.src = officeScript;
node.type = 'text/javascript';
node.async = false;
node.charset = 'utf-8';
document.getElementsByTagName('head')[0].appendChild(node);
answered Nov 21 '18 at 14:55
Andrew Ferguson
60110
60110
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410954%2fangular-unit-tests-referenceerror-type-is-not-defined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You have to import the 2 types on test file
– osiris85
Nov 21 '18 at 11:18
in the
tests.tsfile, you should add your dependencies. Also, it's a bad practice to use scripts in the head of the index, you should use theangular.jsonfile to import JS scripts.– trichetriche
Nov 21 '18 at 11:19