Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen not clearing when clearScreen: true #1924

Closed
6 tasks done
YolCruz opened this issue Aug 27, 2022 · 2 comments
Closed
6 tasks done

Screen not clearing when clearScreen: true #1924

YolCruz opened this issue Aug 27, 2022 · 2 comments

Comments

@YolCruz
Copy link

YolCruz commented Aug 27, 2022

Describe the bug

Might be related to #1125. I have the option clearScreen: true but when in watch mode, the screen is not clearing when the files change.

I have the configuration split in the following way:

// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      // A bunch of paths
    },
  },
  build: {
    sourcemap: true,
    manifest: true,
  },
  clearScreen: true,
});
// vitest.config.ts
import { mergeConfig } from "vite";
import { defineConfig } from "vitest/config";
import viteConfig from "./vite.config";

export default mergeConfig(
  viteConfig,
  defineConfig({
    test: {
      globals: true,
      environment: "jsdom",
      setupFiles: ["./src/reduxSetup.ts", "./src/setup.ts"],
      cache: false,
      sequence: {
        shuffle: false,
      },
    },
    clearScreen: true,
  })
);

Reproduction

Change the test in the StackBlitz to see the terminal not being cleared up

System Info

System:
  OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
  CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
  Memory: 12.30 GB / 15.60 GB
  Container: Yes
  Shell: 5.8 - /usr/bin/zsh
Binaries:
  Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
  Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn
  npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
npmPackages:
  @vitejs/plugin-react: ^2.0.1 => 2.0.1 
  vite: ^3.0.9 => 3.0.9 
  vitest: ^0.22.1 => 0.22.1

Used Package Manager

yarn

Validations

@sun0day
Copy link
Contributor

sun0day commented Aug 30, 2022

In source code, clearScreen real effect is to clear rerun test suits result, not clear all the stdout characters in the terminal. It seems like conflict with vite. @sheremet-va

image

@silverwind
Copy link
Contributor

silverwind commented Nov 2, 2022

I think this may be fixed since #2228. cc: @sheremet-va

@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants