Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
= assertions
== DESCRIPTION: This package adds some additional assertions to Test::Unit::Assertions, including:
== PROBLEMS: None (known).
== SYNOPSIS: ======examples/example.rb: #!/usr/bin/env ruby require 'rubygems' require 'assertions'
require 'test/unit'
class Tests < Test::Unit::TestCase def test_assertions # # Verify that 4 > 5 is false. # assert_not(4 > 5)
#
# Verify that 4 < 5
#
assert_less_than(4, 5)
#
# Verify that 4 < 5 again, but this time with the
# shorter alias.
#
assert_lt(4, 5)
#
# Verify that 5 >= 5
#
assert_ge(5, 5)
#
# Verify that the specified exception is raised.
#
assert_raise_message("Hello, exception!", RuntimeError) do
raise "Hello, exception!"
end
#
# Verify that an assertion failed.
#
assert_fail do
assert_equal(5, 4)
end
#
# Verify an enumerable is sorted
#
assert_sorted([1,2,3])
#
# Verify an enumerable is sorted descending
#
assert_sorted_desc([3,2,1])
#
# Verify an enumerable is sorted based on a key
#
assert_sorted_by(:key, [{:key => 1}, {:key => 2}])
#
# Verify an enumerable is sorted descending based on a key
#
assert_sorted_by(:key, [{:key => 2}, {:key => 1}])
#
# Verify a thing is between two other things
#
assert_between(1, 3, 2)
end end
== INSTALL: gem install assertions
== AUTHORS: === Designing Patterns
== Contributing
git checkout -b my-new-feature
)rake test
)git commit -am 'Added some feature'
)git push origin my-new-feature
)== Meta
Originally Created by Designing Patterns
Maintained by Expected Behavior
Released under the MIT license. http://github.com/expected-behavior/assertions
== SHARE AND ENJOY!
FAQs
Unknown package
We found that assertions-eb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.