This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QuestionnaireCorrectTemplate from "./questionnaireCorrectTemplate"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QuestionnaireCorrectTemplate from "./QuestionnaireCorrectTemplate"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"build:dev:watch": "webpack --watch --config webpack.config.dev.js NODE_ENV=development" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetManagedYearlySalary(person: Employee | Manager) { | |
if ('employees' in person) { | |
person.getYearlySalariesOfAllEmployees(); | |
} else { | |
person.getYearlySalary(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
name: string; | |
constructor(name: string) { | |
this.name = name; | |
} | |
} | |
class Employee extends Person { | |
salary: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetNumberOrLength(variable: string | number): number { | |
if (typeof variable === 'string') { | |
return variable.length; | |
} else { | |
return variable; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetNumberOrLength(variable: string | number): number { | |
return (variable as string).length; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetNumberOrLength(variable: string | number): number { | |
return variable.length; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FormTests: CypressTestsBase | |
{ | |
[Test] | |
public void SubmitTests() | |
{ | |
// some data initialization code here.... | |
RunCypressTest("form/submit_spec.ts"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CypressTestsBase | |
{ | |
protected void RunCypressTest(string cypressSpecFilePath) | |
{ | |
var process = new System.Diagnostics.Process(); | |
var testAssemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | |
if (string.IsNullOrEmpty(testAssemblyPath)) | |
{ | |
throw new Exception("Cannot find test assembly path!"); | |
} |