Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 18 20:35

    sindresorhus on master

    Require Gulp 4 (compare)

  • Jul 06 05:51

    sindresorhus on master

    Require Node.js 8 2.0.0 (compare)

  • Jul 06 05:51

    sindresorhus on v2.0.0

    (compare)

  • Jul 06 05:41
    sindresorhus commented #28
  • Jul 06 05:41
    sindresorhus closed #28
  • Jul 06 05:41

    sindresorhus on master

    Remove gulp-util usage (#28) (compare)

  • Jul 06 05:41
    sindresorhus closed #27
  • Jul 06 05:41
    sindresorhus edited #28
  • Jul 06 05:41
    sindresorhus edited #28
  • Jul 06 05:38
    samueleishion commented #28
  • Jul 06 05:33
    samueleishion synchronize #28
  • Jul 06 01:23
    samueleishion commented #27
  • Jul 05 23:00
    samueleishion synchronize #28
  • Jul 05 22:53
    samueleishion opened #28
  • Jul 04 15:54
    sindresorhus commented #27
  • Jul 04 04:10
    samueleishion commented #27
  • Jul 04 04:02
    samueleishion commented #27
  • Jul 04 03:50
    samueleishion edited #27
  • Jul 04 03:46
    samueleishion opened #27
  • Dec 15 2018 20:37
    sindresorhus closed #26
Pavel
@PavelPolyakov
yes, I thought about them. Who knows, I might be wrong, but I think in WebStorm it was picked up automatically, I might be wrong and can not test it right now.
jy95
@jy95
Since we are near 1.0 release , I wonder @novemberborn if your idea of extensions options to deal with the globbing mess is still on a todo list ?
jy95
@jy95

For example, I use FileHound that allows to do that. For example, here is a sample from my code that find all the media files (thanks @sindresorhus ) in a directory

const  videosExtension = require('video-extensions');
....
const foundFiles = FileHound.create()
            .paths((this.paths.length === 0) ? this.defaultPath : this.paths)
            .ext(videosExtension)
            .find();

The notable disavantage is that this stuff uses a sync way to search ...

Mark Wubben
@novemberborn
@jy95 it’s not necessarily related to globbing. it’s expectations on how AVA handles a particular file extension. now that the babel pipeline can be disabled it’s possible to specify additional extensions. i’ve just been focused on landing breaking changes first
Dan Rosén
@danr
What package is AVA using to watch the file system for changes?
Mark Wubben
@novemberborn
chokidar
Dan Rosén
@danr
@novemberborn thanks!
jy95
@jy95
@novemberborn no problemo : I said that because ava doesn't seem to handle my rewrited project (js to ts) , even if I specify 'test/*/.ts' in 'files' and use 'ts-node/register' in 'register'
andreGarvin
@andreGarvin
Hey is there a there a method that similar to this in ava test.after.all()
@novemberborn @sindresorhus
Sindre Sorhus
@sindresorhus
@andreGarvin You need to explain what it would do.
Mark Wubben
@novemberborn

As Gitter's development seems to have slowed since their acquisition by GitLab we're moving our chat to Spectrum. It's a new product so still rough around the edges, but it's way more than a chat room which we think will be quite useful for the AVA community.

Come join us at spectrum.chat/ava!

Stephan Meijer
@smeijer
Is there a "solve all babel-7-problems" document somewhere? I cannot get the test-runner up and running since I updated babel to 7, and ava to the 1.0-x release
For example, even with a simple config as below, I still have SyntaxError: Unexpected token import errors.
 "ava": {
    "files": [
        // ...
    ],
    "require": [
      "@babel/register",
      "@babel/polyfill"
    ],
    "babel": {
      "testOptions": {
        "babelrc": false,
        "presets": [
          "@babel/preset-stage-2",
          "@babel/preset-react"
        ]
      }
    }
  },
Stephan Meijer
@smeijer
when I add @std/esm to the require list, the import statements work. But than I get errors like: '× No tests found in ...' :confused:
Stephan Meijer
@smeijer
okay, the no tests found is caused by an uncaught exception. Something seems to be wrong with the imports. A simple file as this is causing the issue:
import { GraphQLError } from 'graphql';

class CustomError extends GraphQLError {
  constructor(message, errors = []) {
    super(message);
  }
}

The real error here is somehow in the graphql package. When I extend a custom class class BaseError { constructor() {} } than all seems to be fine.

So, I'm getting closer, but not really understanding what's happening :confused:

Mark Wubben
@novemberborn
@smeijer please post your question in https://spectrum.chat/ava. i suspect it's to do with your source files not being transpiled correctly though. make sure to post a stack trace and your "babelrc" config to spectrum too
Iakiv Kramarenko
@yashaka
Hey guys. Maybe stupid question... So... AVA can run concurrently test FILES, not TESTs in the same file, right?
Mark Wubben
@novemberborn
Hi, please post your question on Spectrum. See above for the link
Iakiv Kramarenko
@yashaka
I can't login there...
no facebook, google, or github log in worked for me...
Mark Wubben
@novemberborn
Any error message I can relay for you?
Iakiv Kramarenko
@yashaka
twitter did not work too... "internal server error". Tried in chrome and firefox
for facebook and github - it just redirects to the spectrum main page
Mark Wubben
@novemberborn
Odd. To your question then, tests do run concurrently, but whether this has an impact depends on whether they're asynchronous or not. Node doesn't run synchronous code concurrently.
Iakiv Kramarenko
@yashaka

hm...
so...
given i have 2 test files with 2 tests in each...
and each test contains async function with implementation
and this implementation is synchronous code, like 3 serial actions
when executing with ava
then there will be two process created for each test file
and instide each process two tests will be triggered concurrently
BUT real actions from both tests among same file will not be executed concurrently. First node will execute one series for 3 actions from one test, then another series of 3 actions from another test from the same file...
AND in parallel - the same will happen concurrently for another test file...

right? :)

Mark Wubben
@novemberborn
Uhm, sure (bit busy so can't verify the exact behavior here). It shouldn't matter is what it comes down to, unless your tests somehow depend on each other which is bad but at times unavoidable. Use test.serial if you're running into that problem
Iakiv Kramarenko
@yashaka

I am actually considering using ava for browser tests, based on selenium webdriver.
All my tests, including tests in the same file are independent. Each test in the same file will open it's own browser and execute a series of actions in it. Then close the browser in the end. So I want to run these concurrently. The problem I have with current test runner is that I can parallelize only files, not tests in the same file. All code from the tests in the same file will be executed sequentially...

question is whether with AVA it will be the same...

Mark Wubben
@novemberborn
it will start all your non-explicitly-serial tests at the same time
Iakiv Kramarenko
@yashaka
thank you, Mark, i will try!
Nisha Sowdri
@sowdri
When a single test in a file is run using t.only(...) and if u is pressed in console to update the snapshots, then the snapshots for all the other tests in the file are replaced with the new snapshot for the current test. Is there a solution to udpate only the snapshots for the current test and leave the other snapshots alone?
Bhuvin Thakker
@bhuvinth
I am trying to install Ava so as to try it for our Project. But apparently I have been facing a lot of issues regarding Babel. I tried to upgrade the Babel but again stuck on Plugin/Preset files are not allowed to export objects.
Please find the things which I did as below:
npm install --global ava
ava --init
And there were a lot of issues for the Babel dependencies, after installing what errors it faced it is stuck on the above message.
Please help.
Tianhao SHI
@SHITianhao
How to require ts-node/register inside vscode debugger launch.json?

I did with those args

      "args": [
        "--ext",
        "ts",
        "--require",
        "ts-node/register",
        "${file}"
      ],

but it doesn't work

Satya Rohith
@satyarohith
Thanks for ava! Should we use any config to run tests in travis? Tests are passing localy but fails in travis. Thanks for taking time!
Sean Genabe
@seangenabe
      "runtimeArgs": [
        "-r",
        "ts-node/register"
      ],
Dimitri Mitropoulos
@dimitropoulos
does anyone know how I can use vscode's debugger with ava and typescript?
presently, I have scripts in my package.json that looks like this:
  "scripts": {
    "test": "tsc && ava",
    "test:serial": "node ./node_modules/.bin/tsc && node --inspect-brk=5858 ./node_modules/.bin/ava --serial",
    "test:watch": "tsc && ava --watch"
  },
ideally, I can do something like this in my launch.json file
        {
            "type": "node",
            "request": "launch",
            "name": "Run AVA tests",
            "runtimeExecutable": "yarn",
            "runtimeArgs": [
                "test:serial"
            ],
            "port": 5858,
            "stopOnEntry": true,
            "sourceMaps": true,
            "cwd": "${workspaceFolder}/my/subdirectory"
        }
Dimitri Mitropoulos
@dimitropoulos
but when I run the above it either get's stuck (breaks) at the first line of ava/cli.jsor just hangs and does nothing at all (depending on other settings)
I also can't seem to see the output on the debug console even when I set outputCapture to std if I use the --inspect-brk flag
Dimitri Mitropoulos
@dimitropoulos
update: nevermind - I moved to jest and it's working. thanks all :)
Qaiser Abbas
@qaiser110
i'd like the avajs test failure logs in the console and also use tap reporter. Is there a way to do that?
Gregor Woiwode
@GregOnNet

Hi,

I there, I fear I ask an often asked question. Yet I did not find an answer. Did someone of you manage getting AvaJS running with Angular 8? If not, does someone know the main problems to come up with a proper configuration? Thanks in advance.

PS: Please find attached the sources I read so far

Sathish
@sathishkumarsoundharajan
without using .serial ?
Ben Chiciudean
@benydc
I have 2 serial tasks and I add on the first one a t.context.demo = "tesfdcd" but the second serial test has t.context.demo undefined
can someone help please?