NativeScript / NativeScript/nativescript-cli

Feature Request: Provision to put test files in feature folder instead of tests folder

Aberta
#2,095 5 comentários 6 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

feature unit testing
Linguagem predominante
JavaScript
Estrelas
1.1k
Forks
204
Merge médio
1d 9h
PRs com merge (30d)
8

Descrição

From @shripalsoni04 on September 30, 2016 15:2

It will be great if we can put our test files in the respective feature folder instead of putting all the test files in app/tests folder.

When we do development for web version of angular application, we put the test files in respective feature folders with .spec.ts suffix as per the angular style guide.

If we can do the same thing in angularNative app also, it will be very easy to get started and it will open a way for unit-test code sharing. As currently we have different structures for test files in nativescript and web version, we cannot share the unit-test files easily and we need to manually copy the unit-test files and change the import path of the module being tested in test file for any cross platform shared code.

I thought to run a script which copies all the .spec.ts file to tests folder from feature folders, but then it will add complexities like adding new/changed test files back to app/tests folder in watch mode.

Let me know if there is already some way and I am missing that.

Thanks.

Copied from original issue: NativeScript/nativescript-angular#482

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece localizando como a CLI atualmente descobre e trata os arquivos de teste em app/tests, incluindo o comportamento no modo watch. Compare esse fluxo com os arquivos .spec.ts solicitados nas pastas de funcionalidades e determine o comportamento esperado para os testes compartilhados; o trabalho estará concluído quando testes locais da funcionalidade forem suportados sem cópia manual.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
angular, typescript
Domínio
cli, testing
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.