Git Product home page Git Product logo

Comments (4)

PatafixPLTX avatar PatafixPLTX commented on June 1, 2024

🤭 Oops, we forgot the real error:

terminal

$ bun test ./src/index.test.ts
bun test v1.0.27 (c34bbb2e)

src/index.test.ts:
ENOENT: No such file or directory
   errno: -2
 syscall: "open"
   path: "test/src/<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="index.ts"></script>
</head>
<body>
    <!-- Hello wrold -->
    <h1>Welcome to my website!</h1>
    <p>This is a cool random paragraph.</p>
    <button onclick="alert('Hello!')">Click me!</button>
    <h2>About Me</h2>
    <p>I am a web developer with a passion for coding. I love to learn new technologies and apply them in my projects.</p>
    <h2>My Skills</h2>
    <!-- <ul>
        <li>HTML</li>
        <li>CSS</li>
        <li>JavaScript</li>
    </ul>
    <h2>Contact Me</h2>
    <p>If you have any questions, feel free to reach out to me at <a href="mailto:[email protected]">[email protected]</a>.</p> -->

</body>
</html>"

✗ Test html minifier function > Expect minified to be smaller than original [4.88ms]
✓ Test html minifier function > 2 * 2 [0.03ms]
-------------------|---------|---------|-------------------
File               | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|---------|-------------------
All files          |  100.00 |  100.00 |
 src/index.test.ts |  100.00 |  100.00 | 
 src/index.ts      |  100.00 |  100.00 | 
-------------------|---------|---------|-------------------

 1 pass
 1 fail
 1 expect() calls
Ran 2 tests across 1 files. [61.00ms]
error: script "test" exited with code 1

from bun.

argosphil avatar argosphil commented on June 1, 2024

Are you sure this is a bun bug? It looks like your require function expects a path relative to test/src, but you hand it the contents of the file at that path instead.

from bun.

PatafixPLTX avatar PatafixPLTX commented on June 1, 2024

Oh, excuse me for this bad report. I automatically applied what my buddy told me, double-checked later, and indeed it was a mistake on our part. I'm so sorry...

Have a nice day!

from bun.

kamil-leys avatar kamil-leys commented on June 1, 2024

Yeah, my bad. However, the terminal output was unclear about what line was causing the issue. ( But I should have isolated completely the line to test it). Anyways, thanks for taking time to answer

from bun.

Related Issues (20)

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.