Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
com.eed3si9n.expecty:expecty_2.13
Advanced tools
Power assertions (as known from Groovy and Spock) for the Scala language.
Expecty brings power assertions as known from Groovy and Spock to the Scala language. It is a micro library that aims to do one thing well.
Expecty was originally written by Peter Niederwieser, author of Spock.
Expecty is licensed under the Apache 2 license.
libraryDependencies += "com.eed3si9n.expecty" %% "expecty" % "<version (see above)>" % Test
Scala Version | JVM | JS (1.x) | Native (0.4.x) |
---|---|---|---|
3.0 | ✅ | ✅ | n/a |
2.13.x | ✅ | ✅ | ✅ |
2.12.x | ✅ | ✅ | ✅ |
2.11.x | ✅ | ✅ | ✅ |
Welcome to Scala 2.12.15 (OpenJDK 64-Bit Server VM, Java 1.8.0_212).
Type in expressions for evaluation. Or try :help.
scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
scala> case class Person(name: String = "Fred", age: Int = 42) {
| def say(words: String*) = words.mkString(" ")
| }
defined class Person
scala> val person = Person()
person: Person = Person(Fred,42)
scala> // Passing expectations
scala> assert(person.name == "Fred")
scala> assert(person.age * 2 == 84)
scala> assert(person.say("Hi", "from", "Expecty!") == "Hi from Expecty!")
scala> // Failing expectation
scala> val word1 = "ping"
word1: String = ping
scala> val word2 = "pong"
word2: String = pong
scala> assert(person.say(word1, word2) == "pong pong")
java.lang.AssertionError: assertion failed
assert(person.say(word1, word2) == "pong pong")
| | | | |
| | ping pong false
| ping pong
Person(Fred,42)
at com.eed3si9n.expecty.Expecty$ExpectyListener.expressionRecorded(Expecty.scala:35)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:39)
... 36 elided
scala> assert(person.age * 2 == 73, "age is not right")
java.lang.AssertionError: assertion failed: age is not right
assert(person.age * 2 == 73, "age is not right")
| | | |
| 42 84 false
Person(Fred,42)
at com.eed3si9n.expecty.Expecty$ExpectyListener.expressionRecorded(Expecty.scala:35)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:39)
... 36 elided
Have a look at ExpectySpec.scala and other specs in the same directory.
FAQs
Power assertions (as known from Groovy and Spock) for the Scala language.
We found that com.eed3si9n.expecty:expecty_2.13 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.