GithubHelp home page GithubHelp logo

typed-test's Introduction

Tylor Steinberger

I'm a self-taught engineer with a passion for learning, creating, and contributing. I'm an Open Source Enthusiast; Author of Motorcycle.ts, Typed; Contributor to Effect, Cycle, Most, and Snabbdom among maintaining and contributing to numerous other open-source libraries you'll find across my profile.

Software is my passion, and I want to build tools for the future.

TylorS' Github Status

My GitHub Streak

typed-test's People

Contributors

tylors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

joshburgess

typed-test's Issues

Allow running multiple browser options in parallel

Currently when running more than one browser option it will fail to spin up a second server with Error: listen EADDRINUSE 0.0.0.0:8000.

Currently all resources are attempted to be duplicated across each test environment. However it should be possible to reuse the same bundle and server to run within each environment

Tests split across multiple directories are not run

When I run typed-test src/**/*.__test__.ts , the test runner halts after the first directory that it finds tests in.

Given the following directory structure:

src
+-- a
|   +-- 1.__test__.ts
|   +-- 2.__test__.ts
+-- b
|   +-- 3.__test__.ts
+-- c
    +-- 4.__test__.ts
    +-- 5.__test__.ts

Only 1.__test__.ts and 2.__test__.ts will be run.

Configuration conflict with microbundle

I just tried @typed/test in @most/index, and it worked great. I ran into a snag, though.

Currently, @typed/test requires tsconfig to have module "commonjs", and microbundle requires it to have module "es2015" or "esnext". As far as I can tell, neither allows specifying an alternate TS config, so I haven't found a way to use the two in the same project.

Here's an example of a Travis run where microbundle failed: https://travis-ci.org/mostjs/index/jobs/514103007.

Any ideas or workarounds for how to use both?

TS warning when running with --typeCheck

I've started using @typed/test in @most/index, and just added the --typeCheck flag to enable type checking when running tests. That yielded a type warning that doesn't seem like it should happen:

โžœ npm test

> @most/[email protected] test /Users/brian/Projects/cujojs/@most/index
> typed-test --typeCheck 'src/**/*.test.ts'

Running tests...
Typechecking...
Typechecking complete.
/Users/brian/Projects/cujojs/@most/index/Users/brian/Projects/cujojs/@most/index/node_modules/@typed/test/lib/results/resultToDom.d.ts (2,62):
  Cannot find name 'HTMLElement'.
/Users/brian/Projects/cujojs/@most/index/Users/brian/Projects/cujojs/@most/index/node_modules/@typed/test/lib/results/resultToDom.d.ts (3,76):
  Cannot find name 'HTMLElement'.

The project isn't specifically using any DOM-related. The path in the error message looks like it's been double-absolute-ized as well. The tests still run successfully, so it's not a blocker.

Any ideas what's going on?

10.0 Project Goals

  • Rebuild assertions library (remove @typed/assertions dep)
  • Remove default of merging CLI options with .typed-test.ts configs
  • Add --config, -c CLI flag for path to Config
    • -c by itself should default to .typed-test.ts
  • Re-run tests when their dependencies change
  • Remove metadata from browser test results to decrease payload size
  • Support running many browsers in parallel
  • Keep browser open in watch mode to live-reload updated tests
  • Investigate tsquery as a way to simplify static analysis
  • Integrate and rebuild the vscode extension to be readable ๐Ÿ˜„
  • Add --onWatch cli flag to call another cli with the files that changed

The latest version of @typed/test that have had some vscode extension support has been in use pretty heavily by myself over the past month or more. While I'm very happy with things now they could be better. With this next version I want to increase memory efficiency across the board, especially in watch mode. A big part of that will be re-architecting things to be able to re-use resources rather than constantly spinning things up and tearing them down.

I had the idea of maybe doing some form of test "linting" to maybe warn of possible errors in your tests. The only cases I can think of currently is not using done() in an asynchronous test, or forgetting to return a promise, and not using an assertion (which fails anyways).

Feature: Re-run tests when dependencies change

Currently a test will only re-run when the test file itself has change, but often you will want your test to rerun when your it's dependencies change to ensure the appropriate tests are still passing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.