Comments (7)
This is the right way. You're just using newer package set than Spec was last modified against.
from purescript-spec.
So, is it a matter of you releasing a new version to regisitry? I don't get what would be the solution to this.
from purescript-spec.
Yes, exactly, it's a matter of releasing a new version.
from purescript-spec.
Looking forward to it then. Thanks!!
from purescript-spec.
Actually, on closer inspection, it appears there is something fishy with your code. The Spec
type doesn't touch Map
in any way, and the only place Map
is used in this library at all is in the reporters, which don't come into play at the stage of defining test cases.
Where do you import that Spec
type from?
from purescript-spec.
I think I was able to track down the problem but still no clue on why it warns on the Spec. First I import spec using:
import Test.Spec (describe, it, Spec)
import Test.Spec.Assertions (fail, shouldEqual)
Then I have a test that is record with a field that is a Map of Maps. Having it here as reference:
, techTrack:
M.fromFoldable
[ Tuple GermanEmpire (M.fromFoldable [ Tuple Box1 [ Just Offensive ] ])
, Tuple FrancoBritishEmpire (M.fromFoldable [ Tuple Box2 [ Nothing ] ])
, Tuple AustroHungarianEmpire mempty
, Tuple RussianEmpire mempty
]
The last 2 lines are the culprits. When I use mempty as in haskell I get the Spec Unit
warning. If I change it to M.empty
the problem goes away.
If it is of any help, the assertions are sequenced because I didn't want a single test for big nested data structure:
case parseJson golden >>= decodeJson of
Left e -> fail ("Couldn't deserialize the golden file: " <> printJsonDecodeError e)
Right (UpdateGameState obtained) -> do
obtained.victoryPoints `shouldEqual` expected.victoryPoints
obtained.techTrack `shouldEqual` expected.techTrack
obtained.missionsTrack `shouldEqual` expected.missionsTrack
obtained.turn `shouldEqual` expected.turn
obtained.counters `shouldEqual` expected.counters
obtained.areaControl `shouldEqual` expected.areaControl
Right _ -> fail ("The BEMsg in the file is not an UpdateGameState")
Does it sound a ring on you?
from purescript-spec.
Well yes, that sounds exactly right: you're using mempty
for a Map
, so you're using the Monoid Map
instance, and that's what gives you a warning.
from purescript-spec.
Related Issues (20)
- Changing timeouts is too difficult HOT 1
- Pursuit docs are not up to date HOT 2
- aroundAll hook HOT 1
- Add flag to run tests in randomised order
- Spec Editor integration HOT 3
- xit HOT 2
- Report output misses last `pending` in each nested `describe`? HOT 1
- itOnly still evalutates? HOT 3
- Add warning to `*Only` HOT 1
- Better reporting for diffs HOT 1
- Use an actual bracket to handle test setup/cleanup HOT 4
- `pulp test` fails on CI HOT 1
- Version 7.3.0 is not in the package set HOT 1
- beforeAll hook and Spec Identity monad HOT 10
- Fix warning in TeamCity file HOT 2
- new Tree type is a breaking api change HOT 3
- Changes in nesting of `describe` causes unexpected changes in reporting HOT 2
- Teamcity reporter overwrites nodes when there are more then one child of a describe HOT 5
- `consoleReporter` not reporting which test that failed when running tests in `parallel` HOT 1
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 purescript-spec.