The test init command to add a sample test in TypeScript for TypeScript/Angular projects
See original GitHub issueThe tns test init
command configures a project for unit testing, creates a tests folder in the app directory and adds an example.js file in it with a sample test.
It would be great the sample test to be in TypeScript (example.ts) for TypeScript/Angular projects.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:26
- Comments:26 (2 by maintainers)
Top Results From Across the Web
Writing unit tests in TypeScript - Chirag Rupani - Medium
Basically, it is installation of npm packages for TypeScript, Test framework (e.g. Jasmine/Mocha/Jest) and specifying test script required to execute test cases ...
Read more >Testing - Angular
The Angular CLI downloads and installs everything you need to test an Angular application with Jasmine testing framework. ... The ng test command...
Read more >Angular unit testing tutorial with examples - LogRocket Blog
This tutorial demonstrates how to build an Angular app and write a unit test, test an async operator, and automatically generate a unit ......
Read more >How to Set Up Angular Unit Testing with Jest - Amadou Sall
Create the jest.config.js file at the root of your project · look for .spec. · read our TypeScript configuration file tsconfig. · compile...
Read more >TypeScript Unit Testing 101: A Developer's Guide - Testim.io
TypeScript Unit Testing: A Practical Example · Installing the TypeScript Compiler · Creating the Basic Folder Structure for the Project · Adding ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In a project of entirely typescript files, it seems backwards to write JavaScript tests. Is there any update to this, or is anyone aware of how to get my tests compiled along with
tns test <platform>
?Adding karma-typescript to the
karma.conf.js
causes issues (Javascript running out of memory, tsconfig related conflicts, generally seems to be the wrong way to achieve this) - I can’t seem to figure out how other people are writing tests in typescript (example: nativescript-angular’s tests are all in typescript)This worked, but the
test init
command put the files insrc/tests/
, so we made this line in thekarma.conf.js
src/tests/**/*.ts