Comments (3)
test: Run tests
With this command we may also be able to support property-based tests.
Discoverability
We should be able to execute as a test any function that meets the following criteria:
- The function is public.
- The function name starts with
test_
(configurable). - If a public function named
beforeEach
is present it can be executed before each test is run.
type | prefix | arguments | semantics |
---|---|---|---|
concrete | test_ |
no | single execution with concrete values |
property | test_ |
yes | multiple executions with randomly generated concrete values (smaller values) |
fuzz | test_ |
yes | multiple executions with randomly generated concrete values (biased)* |
*Also configurable.
For the biased case, depending on the underlying testing library (QuickCheck, hedgehog, falsify), there may exist a command that overrides the scope and shrinking of generated values so the tests can run in 'fuzz' mode. For example:
test
: Run testsfuzz
: Run tests (biased)
from neohaskell.
Yes! I have been using doctest even in F# in the past and I agree with your thoughts around it.
from neohaskell.
This looks awesome!
One of the things that I was thinking to promote was the usage of doctests. Many times folks skip writing tests because it is an additional task to do, and an afterthought in some way.
My hypothesis is that if we teach folks to describe and document their functions, as well as giving an example, we start getting a bit of test coverage, which is better than nothing.
On top of that, now with GitHub Copilot, writing a good documentation, along with examples (doc tests) the implementation of any code becomes much easier.
They also support property based testing, which is cool
from neohaskell.
Related Issues (20)
- HTTP Client Module
- Serialization Modules
- HTML Module that supports HTMX
- Have a `neo pack` command that creates an optimized build
- Implement a basic CLI tool that have a couple of dummy commands
- Create a script that allows installing `neo` and the necessary tools
- Write a section explaining how a NeoHaskell can be deployed anywhere as a standalone actor that processes messages
- Print always a message about reporting issue on command failure
- Have a command for Neo to update itself
- All Neo (sub)commands should have a `help` command that explains how to use it properly
- Neo REPL
- Add a warning for when Git is not installed
- Generate a `.vscode` folder with recommended extensions on project creation
- Create a VSCode NeoHaskell extension pack
- `neo run` should allow running NeoHaskell files directly as scripts
- VSCode extension should allow running current file as script
- Qualified imports by default
- Core library and common modules should be imported by default
- Constant definition with all caps should trigger a custom error message
- Provide a way of ergonomically `cast`ing values
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neohaskell.