profile
viewpoint
Rob Waller RobDWaller Aylesbury, UK https://rbrt.wllr.info I am a developer with a passion for quality and security. I have 15 years experience as a coder, manager and architect.

RobDWaller/dusty 9

A WordPress starter repo which uses Composer and Docker.

RobDWaller/ReallySimpleArrayTest 8

A simple array test to see how experienced and knowledgeable a PHP developer is.

RobDWaller/psr-jwt 5

A PSR-7 and PSR-15 compliant JSON Web Token Middleware Library.

RobDWaller/atlantic-city 3

A Composer based WordPress plugin which displays lyrics from the song Atlantic City in the WordPress admin.

RobDWaller/explicitly 3

Additional assertions for Deno so developers can write more explicit unit tests.

RobDWaller/fakers-zero 3

Rebuild of the original Fakers App released in 2012.

RobDWaller/ReallySimpleJavaScriptTest 2

A simple test for JavaScript

RobDWaller/behat-selenium-chrome 1

This is a simple Library that shows you how to setup Behat, Selenium and Chrome on an Ubuntu environment

RobDWaller/Cuckoo 1

A simple WordPress MVC Theme Framework for building better SOLID themes.

RobDWaller/ReallySimpleCollection 1

A simple collection library for PHP

push eventRobDWaller/deno-basic-examples

RobDWaller

commit sha e7ad75c81029b41d5a559b3b33c1490bc517148f

Added output comments to local and remote import module examples.

view details

RobDWaller

commit sha 9c79c5ba72e36425ad70c6feca697ee6116e1af7

Added dependencies management example along with deps.ts module.

view details

RobDWaller

commit sha f511b073f088e0855449aad4d1622aa506f2dbde

Extended import module README to cover all areas.

view details

push time in 5 days

issue commentdenoland/deno

Improvements to the manual

I've started writing up some basic examples and I should have it finished by next week.

https://github.com/RobDWaller/deno-basic-examples

Hopefully it will acceptable and can form a good set of basic examples which will help new developers get going with Deno. Once I've done this I'm happy to move onto expanding the advanced examples.

I've kept it as a separate repo for now so I don't pollute the Deno repo with lots of changes, will transfer it over if people are happy with the finished product.

ry

comment created time in 7 days

create barnchRobDWaller/deno-basic-examples

branch : master

created branch time in 7 days

created repositoryRobDWaller/deno-basic-examples

A collection of basic Deno examples to get developers started.

created time in 7 days

issue commentdenoland/deno

Improvements to the manual

Question on examples section do we think it should be broken down into basic and advanced?

Currently most of the examples strike me as advanced, for instance the cat example rests on the assumption you know what cat does. It's a good example but to many junior developers it may as well be entitled An implementation of the unix "tac" program.

A basic example might be something like, "How to read a JSON file". I'm sure we could come up with 8 basic examples to go along with the current examples?

ry

comment created time in 13 days

push eventRobDWaller/robdwaller.github.io

RobDWaller

commit sha 9b434124247afd3fcd446e3ba412adc14727c6a2

Final amends to complexity emergence post.

view details

push time in 16 days

push eventRobDWaller/robdwaller.github.io

RobDWaller

commit sha ec7253c3205b96906559bf8e50ac5f1e8930465c

Finished first draft of handle complexity post.

view details

RobDWaller

commit sha d3327a2213c8baf6c4c7ab7befa47d0afd76e466

Finished first draft of the handle complexity post.

view details

push time in 19 days

startedmandiwise/basic-apollo-federation-demo

started time in 21 days

PR closed denoland/deno

Modules Documentation for Standard Library

Better exposes documentation available on the standard library modules in the manual.

Serves as a starting point for the modules documentation so it can be tracked, improved and extended over time.

+37 -1

0 comment

3 changed files

RobDWaller

pr closed time in 22 days

Pull request review commentdenoland/deno

Modules Documentation for Standard Library

+# Modules++The Deno Standard Library contains numerous modules which expose features and+functionality to make a developer's work easier.++Please note the Standard Library is currently unstable and some documentation is+yet to be completed.++- [Archive](/std/archive)+- Async+- [Bytes](/std/bytes)+- [Date Time](/std/datetime)+- [Encoding](/std/encoding)+- [Flags](/std/flags)+- [Format](/std/fmt)+- [File System](/std/fs)+- [Hash](/std/hash)+- [HTTP](/std/http)+- [Input Output](/std/io)+- [Log](/std/log)+- Mime+- [Node](/std/node)+- [Path](/std/path)+- Permissions+- Signal+- [Testing](/std/testing)+- Text Proto+- [UUID](/std/uuid)+- [WebAssembly System Interface](/std/wasi)+- [Web Socket](/std/ws)

Ok cool. 👍

RobDWaller

comment created time in 22 days

Pull request review commentdenoland/deno

Modules Documentation for Standard Library

+# Modules++The Deno Standard Library contains numerous modules which expose features and+functionality to make a developer's work easier.++Please note the Standard Library is currently unstable and some documentation is+yet to be completed.++- [Archive](/std/archive)+- Async+- [Bytes](/std/bytes)+- [Date Time](/std/datetime)+- [Encoding](/std/encoding)+- [Flags](/std/flags)+- [Format](/std/fmt)+- [File System](/std/fs)+- [Hash](/std/hash)+- [HTTP](/std/http)+- [Input Output](/std/io)+- [Log](/std/log)+- Mime+- [Node](/std/node)+- [Path](/std/path)+- Permissions+- Signal+- [Testing](/std/testing)+- Text Proto+- [UUID](/std/uuid)+- [WebAssembly System Interface](/std/wasi)+- [Web Socket](/std/ws)

I'm happy to leave this if you really don't think it is needed, but do you not think this will aid with discoverability? Even if it creates a maintenance overhead.

I think there needs to be something in the manual to aid developers with learning Deno's standard library, and I'd see this as a start point rather than an endpoint.

RobDWaller

comment created time in 22 days

startedmandiwise/space-camp-federation-demo

started time in 22 days

PR opened denoland/deno

Modules Documentation for Standard Library

Better exposes documentation available on the standard library modules in the manual.

Serves as a starting point for the modules documentation so it can be tracked, improved and extended over time.

+37 -1

0 comment

3 changed files

pr created time in 23 days

create barnchRobDWaller/deno

branch : docs-std-library

created branch time in 24 days

push eventRobDWaller/deno

Kitson Kelly

commit sha 2527a6e296ab2614991c17a2e3ac518a5a579776

fix: move ImportMeta to deno.ns lib (#6588)

view details

Bartek Iwańczuk

commit sha 2b0dc32718fb4891c788ca9a589ceea8095c1229

upgrade: dprint-typescript-plugin 0.19.5, deno_lint 0.1.15 (#6614)

view details

Bartek Iwańczuk

commit sha be07aaed84946a13ec514c39606e2030e47af73f

v1.1.3

view details

Casper Beyer

commit sha fca492907cb0e6b12f202681ccf36278b5bfa81a

test(cli): enable realpath symlink tests on Windows (#6627)

view details

Ryan Dahl

commit sha 5f9e600c5bb78ae35a9a12d250f1d7cad79cf7a4

chore: port http_server.py to rust (#6364)

view details

Kyle June

commit sha d52e4007c887caaa073e43088fd92c3589a41dd5

Update timers to ignore Date Override (#6552)

view details

Bert Belder

commit sha e4e80f20c2f85cfb9ea1ae1a499ac24fd206f99b

fix(tools): command line args parsing bug, unused function parameter (#6629)

view details

Marcos Casagrande

commit sha 91767501e127a0de40d34d38bf769702fcb7c942

feat(std/node): add buf.equals method (#6640)

view details

Marcos Casagrande

commit sha 43db7aa05dc4a4265d0f98cc7cdf577e77927bf1

fix(std/node): add encoding argument to Buffer.byteLength (#6639)

view details

Casper Beyer

commit sha 960800888a24938d006dd5a218ae482c2e9cb1d0

test(std/wasi): explicitly assert each expected arg (#6633)

view details

Marcos Casagrande

commit sha f85a0ce6346eda1366e2ddd2c3868b8853cd81cc

refactor(cli/body): use Deno.Buffer in bufferFromStream (#6632)

view details

Casper Beyer

commit sha 9ac416913e80b1eb9fc4a3fb71a30e68966ca2d6

test(std/node): include windows in link tests (#6620)

view details

Casper Beyer

commit sha 79400b8f7df6d3e8e8ebbe2245b997df8b3fd842

feat(std/wasi): implement fd_readdir (#6631)

view details

Casper Beyer

commit sha e91594935a0cda8a898011fd61640e27c04028d4

re-enable follow symlinks walk test on Windows (#6626)

view details

Anton Dmytriichuk

commit sha d4f9457536932c27937e5f7c6948cd6ef547ae25

fix(std/mime): boundary random hex values (#6646)

view details

Ryan Dahl

commit sha f35edc574aea43f65e052db148d9b337d7f2dae4

Remove test_server dependency from benchmarks (#6645)

view details

Kitson Kelly

commit sha 4f60a0b3bd4732ce835f2027aa82edbb5ea6c7f9

chore: improve type safety of cli/js/compiler (#6647)

view details

Casper Beyer

commit sha 5b09e721d3a390bbe79ac0403ab0670faeb12823

test(std/wasi) add std::fs::File seek test (#6648)

view details

Marcos Casagrande

commit sha 3b4260dc54237070e28f31e6253f3fa125153638

fix(cli/fetch): response constructor default properties (#6650)

view details

Casper Beyer

commit sha 714b89437062f7181e8d6f7c30663c7c69d02920

fix(std/wasi): return errno::success from fd_tell (#6636)

view details

push time in 24 days

issue commentdenoland/deno

add assertNotThrows/Async to asserts.ts

@shawnthehumble I added this functionality to my assertion library... https://github.com/RobDWaller/explicitly#assert-not-throws

Might help. 👍

shawnthehumble

comment created time in a month

created tagRobDWaller/explicitly

tag0.4.0

Additional assertions for Deno so developers can write more explicit unit tests.

created time in a month

release RobDWaller/explicitly

0.4.0

released time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha dbd354d84237a990235ddac094c0d82afd99a469

Upgraded resulty dependency to v 0.3.1.

view details

RobDWaller

commit sha e4f7f08b7d821d3f2f2ad72dd47874123e1879ce

Minor amend to handleError method in main mod to unwrapErr so it now works with resulty 0.3.1

view details

RobDWaller

commit sha f81db4d8e49fa0613c4118c3758eca2e01a636df

Added errorMessage method to the message module to fulfill a need in the new Throws module. This message module needs tidying up in a subsequent release.

view details

RobDWaller

commit sha 61dced5eaca0197218e921e21a852dfd6a1ff180

Created initial throws module for asserting something does not throw an error. Also added unit tests.

view details

RobDWaller

commit sha 837cc65a9bac078b794c3b817c64d42912bb159b

Added further tests to highlight how to test a class method does not throw in the throws module.

view details

RobDWaller

commit sha a531e4eb85684bb0007dd9b5030e2cd34fb22155

Applied deno format fixes to new Throws module and throws test module.

view details

RobDWaller

commit sha 5b996071dfa84946b3be57e3bb8b2e08be1c5a32

Added count equality check method and added unit tests.

view details

RobDWaller

commit sha 0c47cd94cd2bb6ae355960eb52d9d913b0099294

Added method comments to main module assertion methods, improves documentation and usability of the library.

view details

RobDWaller

commit sha a782a5fa0c7beb8cdfffa5e716d9454948c634f5

Got error messages working and handling callbacks correctly. This module needs a complete rewrite and the getValueOrName method needs to be abstracted and tested in isolation.

view details

RobDWaller

commit sha 232827fbd05f733697c228eb163a9b83852265c9

Added assertNotThrows method to main module along with tests and code comments.

view details

RobDWaller

commit sha 58918b4b614a6488988077444a64aa2598807bce

Appliend deno formatting fixes to recently updated code.

view details

RobDWaller

commit sha c490486944a5a436456f5c5076942a1c41cd1ebf

Added assertCount method to assert an array has a defined number of elements.

view details

RobDWaller

commit sha 5f04d80e8ebc4be1bf9b16ad79911ccc40e64606

Fixed assertCount and assertNotThrows method signature return types so they are void.

view details

RobDWaller

commit sha 326e380bc6066e4c163d22066eefff32ab275a2f

Added assertCount and assertNotThrows examples tests to examples test module.

view details

RobDWaller

commit sha 07824172c957bacc5a12a70d35d2775923089a4b

Updated README with information on new assertCount and assertNotThrows methods.

view details

RobDWaller

commit sha 621b77dc22ca1f7c4ee1894acd9d9b9b98dbaafe

Fixed windows line ending issue in LICENSE file.

view details

RobDWaller

commit sha 81f30c1017549f91f630e257357c81c65145dd72

Fixed windows line ending issue in README file.

view details

RobDWaller

commit sha 289430ee0b63a96b3aa3693e316b0cd1c5e1c7f9

Applied deno formatting fixes to main module and example test module.

view details

RobDWaller

commit sha f8b77bdabf59e301a8115729498d0b90b42118d0

Updated readme doc with Docs link badge, and correct module version number under the installation notes.

view details

RobDWaller

commit sha 394b893a9b94a604b16b3a938ff4f3d5b7f60747

Added egg.json config for nest.land publishing.

view details

push time in a month

PR merged RobDWaller/explicitly

0.4.0 enhancement
  • Upgraded resulty version
  • Fixed resulty unwrap integration
  • added errorMessage method
  • created throws Module
  • created assertNotThrows method
  • fixed callback issue in error message generation
  • created assertCount method
  • updated readme
  • added nest.land integration
  • added assertion method comments
  • fixed line ending issues in License file and README.
+536 -217

0 comment

14 changed files

RobDWaller

pr closed time in a month

PR opened RobDWaller/explicitly

0.4.0 enhancement
  • Upgraded resulty version
  • Fixed resulty unwrap integration
  • added errorMessage method
  • created throws Module
  • created assertNotThrows method
  • fixed callback issue in error message generation
  • created assertCount method
  • updated readme
  • added nest.land integration
  • added assertion method comments
  • fixed line ending issues in License file and README.
+536 -217

0 comment

14 changed files

pr created time in a month

PR opened denoland/deno

Bug Deno Assert Throw Parent Error

Currently neither assertThrows() or assertThrowsAsync() allow you to assert whether a parent has been thrown.

So AssertionError is an instance of Error but you can't assert Error has been thrown with assertThrows() or assertThrowsAsync().

Imagine a scenario where a method under test can throw one of a number of error types all of the same parent type. You can't currently assertThrow based on the parent type.

+24 -4

0 comment

2 changed files

pr created time in a month

create barnchRobDWaller/deno

branch : bug-deno-throws-parent-error

created branch time in a month

push eventRobDWaller/deno

Kitson Kelly

commit sha 1d8fc394945fb4447cec23fbfc61fc8961126b7a

Add ability to output compiler performance information (#6434)

view details

Casper Beyer

commit sha f318ab01a47cecac9df62d11cb0c745f39523da9

fix(std/testing) assertArrayContains should work with any array-like (#6402)

view details

Colin Harrington

commit sha f4397e5ec99c539e4c6977e3eff873d672f98413

Update contributing.md for consistency (#6452)

view details

Casper Beyer

commit sha a354b248ea8ecb7fb10742322d7a36ad71eddf0a

feat(std/wasi): add wasi_snapshot_preview1 (#6441)

view details

Colin Harrington

commit sha 702547d65a9cb60ca6672792c08225b1c3099bad

fix(cli): ipv6 parsing for --allow-net params (#6453) Co-authored-by: Liming Jin <jinliming2@gmail.com>

view details

Nayeem Rahman

commit sha 3314b463215a8e59ec46d722adb70a22cd3ef832

fix(cli/js/web/console): Improve string quoting behaviour (#6457)

view details

Bartek Iwańczuk

commit sha 3cbd1075c78703b4852760ec5bfa2e4dbb53c737

Incremental compilation for TypeScript (#6428) This commit adds incremental compilation capabilities to internal TS compiler. Instead of using "ts.createProgram()" API for compilation step (during deno startup), "ts.createIncrementalProgram()" API is used instead. Thanks to TS' ".tsbuildinfo" file that already stores all necessary metadata for compilation I was able to remove our own invention that is ".graph" file. ".tsbuildinfo" file is stored alongside compiled source and is used to cache-bust outdated dependencies, facilitated by the "version" field. The value for "version" field is computed in Rust during loading of module graph and is basically a hash of the file contents. Please keep in mind that incremental compilation is only used for initial compilation (or dynamic imports compilation) - bundling and runtime compiler APIs haven't been changed at all. Due to problems with source map I changed compilation settings to inline source map (inlineSourceMap instead of sourceMap).

view details

Ryan Dahl

commit sha 062086260520c2a24bfd8e840295ecd0f55120af

Clean up some fetch_remote_source tets (#6446)

view details

Casper Beyer

commit sha f39c890714ad4479b42be8f24ffda185a062bd16

doc(std/wasi) add a list of supported syscalls (#6460)

view details

Bartek Iwańczuk

commit sha 6bbe52fba33e440e113bca423b5eae0d1f320c49

Revert "fix(cli): ipv6 parsing for --allow-net params (#6453)" (#6458)

view details

Casper Beyer

commit sha 87f8f99c49e62c06f85bb453a7c12b32634c3bef

refactor(cli/tests/unit) to use assertThrows (#6459)

view details

Marcos Casagrande

commit sha 6527189520b62c08f0e376a5a1f0163f0de82baa

doc(std/wasi): fix example (#6464)

view details

Chris Knight

commit sha c98038a03228d527cd90d9f1fc0118a3fe47dce0

doc: add info on installing wasm32-wasi target (#6470)

view details

Chris Knight

commit sha d9896d64ce919a46a6e8c6666c3b87cc9ae79b7b

refactor: shift copyBytes and tweak deps to reduce dependencies (#6469)

view details

Casper Beyer

commit sha ab0f12fcb80d6ad9bb74c9ba427fc73d302831ab

Remove stale comment referring to deleted code (#6462)

view details

Stanislav

commit sha 7ea3071db5b05cfe284fecfed28a66f7508dad6d

docs: replace delCookie with deleteCookie (#6467)

view details

Benjamin Lupton

commit sha 16038b8f82d0f3f610d97d721c39d6585fe90295

fix(std/node/process): env, argv exports (#6455) The promise approach still required permissions to be specified at initialisation, rather than at request. Using a Proxy instance solves this permission issue. The Proxy instance approach also eliminates the need for the await. Achieving direct compatibility with Node.js. /ref pr #6392 /ref commit d16337cc9c59732fe81655482e08b72d844472e6

view details

Casper Beyer

commit sha a455a0babf4930a2476a70144923828073c19e68

Fix readLinkSync and readLink tests on Windows (#6463)

view details

Marcos Casagrande

commit sha 3f710108f2d7a67ff460c058a6f6bd532d428654

fix(std/io): Make BufWriter/BufWriterSync.flush write all chunks (#6269)

view details

Bartek Iwańczuk

commit sha 188839c87501f6b67d0e5d179121c16c5c1f21c0

Revert "chore: share HTTP server between tests (#6362)" (#6475) This reverts commit 70147ee56418c3d67a29070c01746a44d353e855.

view details

push time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha 394b893a9b94a604b16b3a938ff4f3d5b7f60747

Added egg.json config for nest.land publishing.

view details

push time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha f8b77bdabf59e301a8115729498d0b90b42118d0

Updated readme doc with Docs link badge, and correct module version number under the installation notes.

view details

push time in a month

delete branch RobDWaller/resulty

delete branch : 0.3.1

delete time in a month

delete branch RobDWaller/resulty

delete branch : 0.3.0

delete time in a month

delete branch RobDWaller/resulty

delete branch : 0.2.0

delete time in a month

delete branch RobDWaller/explicitly

delete branch : 0.3.1

delete time in a month

delete branch RobDWaller/explicitly

delete branch : 0.3.0

delete time in a month

delete branch RobDWaller/explicitly

delete branch : 0.2.0

delete time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha c490486944a5a436456f5c5076942a1c41cd1ebf

Added assertCount method to assert an array has a defined number of elements.

view details

RobDWaller

commit sha 5f04d80e8ebc4be1bf9b16ad79911ccc40e64606

Fixed assertCount and assertNotThrows method signature return types so they are void.

view details

RobDWaller

commit sha 326e380bc6066e4c163d22066eefff32ab275a2f

Added assertCount and assertNotThrows examples tests to examples test module.

view details

RobDWaller

commit sha 07824172c957bacc5a12a70d35d2775923089a4b

Updated README with information on new assertCount and assertNotThrows methods.

view details

RobDWaller

commit sha 621b77dc22ca1f7c4ee1894acd9d9b9b98dbaafe

Fixed windows line ending issue in LICENSE file.

view details

RobDWaller

commit sha 81f30c1017549f91f630e257357c81c65145dd72

Fixed windows line ending issue in README file.

view details

RobDWaller

commit sha 289430ee0b63a96b3aa3693e316b0cd1c5e1c7f9

Applied deno formatting fixes to main module and example test module.

view details

push time in a month

create barnchRobDWaller/explicitly

branch : 0.4.0

created branch time in a month

created tagRobDWaller/resulty

tag0.3.1

Provides simple, Rust-like Result and Option objects for Deno.

created time in a month

release RobDWaller/resulty

0.3.1

released time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha f9e585e99a24df10a0519f4e12ed1cb3627a1020

Created example tests to properly highlight how polymorphism and type narrowing work.

view details

RobDWaller

commit sha b981989659826f2e816d6f16efe25028ef19ff18

Fixed issue with isOk and isError methods so they have type guards and allow type narrowing. Removed Is module as no longer needed.

view details

RobDWaller

commit sha 7d3137b27a6f16d66456934ccac094be36df92a9

Fixed issue with isSome and isNone methods so they have type guards and allow type narrowing. Removed Is module as no longer needed.

view details

RobDWaller

commit sha 59818f68d78a78a3e0057c25f2cf4027f060625e

Deleted is module as it is no longer needed.

view details

RobDWaller

commit sha 827729d79b1f350dd9e207b86cc1fc54057c61ee

Amended return type on none method so it is explicit and therefore works properly.

view details

RobDWaller

commit sha d2ec223d947ce1b499091ca35673560a6bda4293

Fixed failing unwrapNone tests so it asserts null not undefined which is now incorrect.

view details

RobDWaller

commit sha 0504ac4ae7da217b9ace17df4190675d97906a8b

Fixed deno formatting issue example tests module.

view details

RobDWaller

commit sha 7a77c7f3a283a5a2c4ff5ffd90268658498aeccd

Bumped version number reference to 0.3.1 in README Docs.

view details

RobDWaller

commit sha 30b019d24aa9e16628fd53b2e4fc17704223acf2

Bumped version number reference to 0.3.1 in nest.land egg.json config.

view details

Rob Waller

commit sha 0496c9ea8cb035fae3e9e8ba755ac71193960100

Merge pull request #3 from RobDWaller/0.3.1 0.3.1

view details

push time in a month

PR merged RobDWaller/resulty

0.3.1 bug
  • Adds type guarding to fix type narrowing issue.
+74 -29

0 comment

8 changed files

RobDWaller

pr closed time in a month

PR opened RobDWaller/resulty

0.3.1 bug
  • Adds type guarding to fix type narrowing issue.
+74 -29

0 comment

8 changed files

pr created time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha 7a77c7f3a283a5a2c4ff5ffd90268658498aeccd

Bumped version number reference to 0.3.1 in README Docs.

view details

RobDWaller

commit sha 30b019d24aa9e16628fd53b2e4fc17704223acf2

Bumped version number reference to 0.3.1 in nest.land egg.json config.

view details

push time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha 0504ac4ae7da217b9ace17df4190675d97906a8b

Fixed deno formatting issue example tests module.

view details

push time in a month

create barnchRobDWaller/resulty

branch : 0.3.1

created branch time in a month

created tagRobDWaller/explicitly

tag0.3.1

Additional assertions for Deno so developers can write more explicit unit tests.

created time in a month

release RobDWaller/explicitly

0.3.1

released time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha 9bef526007d7258b169c40e471ae99eae201c906

Fixed error in README with assertFloat signature.

view details

RobDWaller

commit sha 96a227af8933c58e78cb6ec63845ea47547a9c36

Created a deps.ts file to house external runtime dependencies in a single place as is advised by the Deno documentation.

view details

RobDWaller

commit sha 860745707ed0bffb772d50353444fbee570c1e02

Got deps.ts and dev_deps.ts working fully so all external runtime and test dependencies work as expected.

view details

RobDWaller

commit sha 62c2bd88103037928438b367e01a990e2d1a4b68

Fixes to color dependencies in equality and message module tests.

view details

RobDWaller

commit sha 833b3b3917de065e8631a33d35f512e37563178c

Applied deno format fixes to new dependency files.

view details

Rob Waller

commit sha bf3d3bf575e5ee00b7fa5ac8190179e99506ec2c

Merge pull request #4 from RobDWaller/0.3.1 0.3.1

view details

push time in a month

PR merged RobDWaller/explicitly

0.3.1 bug
  • Fixed README doc error
  • Fixed dependencies issue.
+28 -14

0 comment

12 changed files

RobDWaller

pr closed time in a month

issue commentnestlandofficial/nest.land

[BUG] Eggs Publish Link 404s

Well should the link https://nest.land/package/resulty@0.3.0 resolve?

Also I ran eggs upgrade but still get 0.1.2 when I run eggs -V, I'm assuming 0.1.2 is the latest version?

RobDWaller

comment created time in a month

PR opened RobDWaller/explicitly

0.3.1 bug
  • Fixed README doc error
  • Fixed dependencies issue.
+28 -14

0 comment

12 changed files

pr created time in a month

create barnchRobDWaller/explicitly

branch : 0.3.1

created branch time in a month

issue openednestlandofficial/nest.land

[BUG] Eggs Publish Link 404s

Describe the bug When you run eggs publish it generates the following output:

You can now find your package on our registry at https://nest.land/package/resulty@0.3.0

The link https://nest.land/package/resulty@0.3.0 will 404.

To Reproduce Run eggs publish.

Expected behavior The link generated by the eggs publish command should resolve, AKA return 200.

Screenshots eggs-publish-cli-error nest404

Desktop (please complete the following information):

  • OS: Docker Ubuntu 18.04
  • nest.land Version 0.1.2

Smartphone (please complete the following information):

  • Desktop

created time in a month

issue closeddenoland/deno

Is format() method in std/testing/asserts.ts working as expected

Hi I've been having a look at this and I'm a little unclear what the expected behavior should be for the format() method within std/testing/assets.ts module.

See related issues: #4023 and #4749

If I write a failing test which inputs 'John said, "Hello!" to Dave.' I will get the following output to the command line "John said, \"Hello!\" to Dave." .

As an example, this test:

test({
  name: "failed with string contains quote",
  fn(): void {
    assertThrows(
      (): void => assertEquals(
        'John said, "Hello!" to Dave.',
        'John said, "Hello" to Dave.'
      ),
      AssertionError,
      [
        "Values are not equal:",
        ...createHeader(),
        removed(`-   "John said, "Hello!" to Dave."`),
        added(`+   "John said, "Hello" to Dave."`),
        "",
      ].join("\n")
    );
  },
});

Will produce this output:

deno-fail

Is the replace() method actually required here given the string is inside a template literal?

string = `"${string.replace(/(?=["\\])/g, "\\")}"`;

If it is removed it resolves this issue and does not seem to break any other tests. It would be great to get some clarification on what the expected behavior is as it will influence how tests are written generally.

closed time in a month

RobDWaller

issue commentdenoland/deno

Is format() method in std/testing/asserts.ts working as expected

This is expected behaviour, not an issue.

RobDWaller

comment created time in a month

created tagRobDWaller/resulty

tag0.3.0

Provides simple, Rust-like Result and Option objects for Deno.

created time in a month

release RobDWaller/resulty

0.3.0

released time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha cd6786459c9d17c51c2623728362291437cdc120

Fix line ending issue in README documentation.

view details

RobDWaller

commit sha 3c1fb297f4721a5572b634f2870d794abf661880

Fixed line ending issue with MIT License file.

view details

RobDWaller

commit sha ded24b7047d906faa07b215626e5028d6e311c9c

Split out example tests into their testing module so this is clearer.

view details

RobDWaller

commit sha 004ae38219bf5a9163c3a526993169af428ccc3b

Fixed asserts module dependency to a specific version as an update caused a breakage.

view details

RobDWaller

commit sha 89bf0dec5b304507f2d799bf34ff377691dc4732

Removed readonly state from Option and Result properties which are methods and don't need them.

view details

RobDWaller

commit sha 2257980b8257633c2aa38afbbabe7032d0ba1eee

Updated Result module so Ok and Err class implement the Result interface, for some reason they didn't.

view details

RobDWaller

commit sha 23d4b1688728247a3871276e1f15208bee22780e

Abstracted Is interface from the result module as it will be needed in the option module too.

view details

RobDWaller

commit sha 06e89bfad12919eb3ae3dc916feda349b41f2e60

Added isSome and isNone to options module, this functionality is available in Rust. Added unit tests.

view details

RobDWaller

commit sha 51ae2a5ca8456d1ac8b56f67e884949f80237c80

Created Panic Error class, for use in Options and Result objects.

view details

RobDWaller

commit sha 81c7a4d11f626c122de4aa023506547248bc7eb6

Added unwrapErr method to Result objects and set both unwrap and unwrapErr methods to correctly panic on Ok and Err objects. Added and updated Unit Tests.

view details

RobDWaller

commit sha ab5caf472597cf1a66c6ac43ef7917e207050d03

Tidied up code formatting to align with Deno fmt.

view details

RobDWaller

commit sha 7d3af21e681d7e7af355dbd87badbb804b111696

Added unrwap none method to Options and ensured unrwap and unwrapNone panic correctly on some and none objects. Added and updated tests.

view details

RobDWaller

commit sha 3f1c7235e97e479a0b4926425a9e52088df7942d

Fixed unwrap and unwrapErr methods so they are void where applicable.

view details

RobDWaller

commit sha 243dc5cadb7b053a1bb8225153692472ee875f55

Updated documentation to reflect improvements made to library.

view details

RobDWaller

commit sha abd5364cd29c1b043885ca40cbdec883ca2257cf

Fixed spacing issue between none and ok methods in main module.

view details

RobDWaller

commit sha c410e48f7198ffc0311c8dab165f5661e626ffe4

Implemented dev_deps.ts file to export dev dependencies in a single place. Makes updating versions easier.

view details

RobDWaller

commit sha fb88c7bce9558329327ae3fb3c74e6d2bd81ef22

Added nest.land egg.json config for package repository.

view details

RobDWaller

commit sha 4fb236fccad0cdef0d3e00a8d090453255086c4c

Added LICENSE to egg.json files config.

view details

RobDWaller

commit sha ea96b78e6403cb6d58a6b44820cd8c3f3dc90892

Added updates to readme including badges and import versions.

view details

RobDWaller

commit sha 28b8cfdc9b3a7f45a9ea5dc04963637f42b102b5

Minor amends to README documentation.

view details

push time in a month

PR merged RobDWaller/resulty

0.3.0 enhancement
  • Updated License File.
  • Updated README.
  • Added Panic functionality.
  • Abstracted Is interface to separate module.
  • Added unwrapErr() and unwrapNone() methods.
  • Added isSome() and isNone() methods.
  • Created separate example tests module.
  • Added nest.land egg.json config.
  • Added dev_deps.ts file.
  • Fixed Ok and Err objects so the properly implement Result interface.
+383 -214

0 comment

13 changed files

RobDWaller

pr closed time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha 87f569424a544787ecf2d613e589056c1fbd1819

Final tidy up of README documentation for release 0.3.0.

view details

push time in a month

PR opened RobDWaller/resulty

0.3.0 enhancement
  • Updated License File.
  • Updated README.
  • Added Panic functionality.
  • Abstracted Is interface to separate module.
  • Added unwrapErr() and unwrapNone() methods.
  • Added isSome() and isNone() methods.
  • Created separate example tests module.
  • Added nest.land egg.json config.
  • Added dev_deps.ts file.
  • Fixed Ok and Err objects so the properly implement Result interface.
+382 -214

0 comment

13 changed files

pr created time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha 28b8cfdc9b3a7f45a9ea5dc04963637f42b102b5

Minor amends to README documentation.

view details

push time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha ea96b78e6403cb6d58a6b44820cd8c3f3dc90892

Added updates to readme including badges and import versions.

view details

push time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha abd5364cd29c1b043885ca40cbdec883ca2257cf

Fixed spacing issue between none and ok methods in main module.

view details

RobDWaller

commit sha c410e48f7198ffc0311c8dab165f5661e626ffe4

Implemented dev_deps.ts file to export dev dependencies in a single place. Makes updating versions easier.

view details

RobDWaller

commit sha fb88c7bce9558329327ae3fb3c74e6d2bd81ef22

Added nest.land egg.json config for package repository.

view details

RobDWaller

commit sha 4fb236fccad0cdef0d3e00a8d090453255086c4c

Added LICENSE to egg.json files config.

view details

push time in a month

push eventRobDWaller/resulty

RobDWaller

commit sha 3f1c7235e97e479a0b4926425a9e52088df7942d

Fixed unwrap and unwrapErr methods so they are void where applicable.

view details

RobDWaller

commit sha 243dc5cadb7b053a1bb8225153692472ee875f55

Updated documentation to reflect improvements made to library.

view details

push time in a month

pull request commentdenoland/deno

Bug fix for format method in asserts module

@ry I'm happy for this to be closed along with the issue #5590 as @nayeemrmn has explained how the behavior is expected.

RobDWaller

comment created time in a month

create barnchRobDWaller/resulty

branch : 0.3.0

created branch time in a month

startedprewk/option

started time in a month

fork RobDWaller/rhum

A lightweight testing framework for Deno.

fork in a month

starteddrashland/rhum

started time in a month

Pull request review commentdenoland/deno

Bug fix for format method in asserts module

 Deno.test({     );   }, });++Deno.test({+  name: "failed with string contains quote",+  fn(): void {+    assertThrows(+      (): void =>+        assertEquals(+          'John said, "Hello!" to Dave.',+          'John said, "Hello" to Dave.'+        ),+      AssertionError,+      [+        "Values are not equal:",+        ...createHeader(),+        removed(`-   "John said, "Hello!" to Dave."`),

@nayeemrmn the purpose of the issue I raised and this pull request was really to find out if this was expected behavior as it struck me as confusing.

Given this is expected behavior then I'm happy to close this pull request and the issue #5590.

Maybe I will write some additional documentation on asserting error messages so this behavior is clear for all users of Deno.

RobDWaller

comment created time in a month

push eventRobDWaller/deno

Rob Waller

commit sha d615f0ff82f5b2b530940a21a61e5b4b08b1d1f4

fix(std/testing): assertThrows gracefully fails if non-Error thrown (#6330)

view details

Casper Beyer

commit sha 63db3e933e90cdf43580c4c670eace5cd92d5a43

feat(core): enable experimental-wasm-bigint (#6443)

view details

Benjamin Lupton

commit sha d16337cc9c59732fe81655482e08b72d844472e6

fix(std/node): global process should usable (#6392)

view details

Benjamin Lupton

commit sha 49c54c0805ab26410a62e0251fee3a28b98c0e13

fix(std/node): fix readFile types, add encoding types (#6451)

view details

Chris Couzens

commit sha f6a41469730e8dcd0995d3e5dd370b9410c65ba4

fix(cli/web): Support URLSearchParam as Body (#6416) The following used to fail in Deno despite working in the browser: ```javascript new Request('http://localhost/', {method: 'POST', body: new URLSearchParams({hello: 'world'})}).text().then(console.log) ```

view details

RobDWaller

commit sha f327dc8491ada46bddc400bced9bca4507ae1c34

Merged changes to asserts test module in to working branch so things are up to date.

view details

push time in a month

push eventRobDWaller/deno

Rob Waller

commit sha d615f0ff82f5b2b530940a21a61e5b4b08b1d1f4

fix(std/testing): assertThrows gracefully fails if non-Error thrown (#6330)

view details

Casper Beyer

commit sha 63db3e933e90cdf43580c4c670eace5cd92d5a43

feat(core): enable experimental-wasm-bigint (#6443)

view details

Benjamin Lupton

commit sha d16337cc9c59732fe81655482e08b72d844472e6

fix(std/node): global process should usable (#6392)

view details

Benjamin Lupton

commit sha 49c54c0805ab26410a62e0251fee3a28b98c0e13

fix(std/node): fix readFile types, add encoding types (#6451)

view details

Chris Couzens

commit sha f6a41469730e8dcd0995d3e5dd370b9410c65ba4

fix(cli/web): Support URLSearchParam as Body (#6416) The following used to fail in Deno despite working in the browser: ```javascript new Request('http://localhost/', {method: 'POST', body: new URLSearchParams({hello: 'world'})}).text().then(console.log) ```

view details

push time in a month

Pull request review commentdenoland/deno

Bug fix for format method in asserts module

 export class AssertionError extends Error {   } } -function format(v: unknown): string {-  let string = globalThis.Deno ? Deno.inspect(v) : String(v);-  if (typeof v == "string") {-    string = `"${string.replace(/(?=["\\])/g, "\\")}"`;+/**+ * Format value to string for output to CLI on error.+ */+function format(value: unknown): string {+  const string = globalThis.Deno ? Deno.inspect(value) : String(value);+  if (typeof value === "string") {+    return `"${string}"`;   }   return string; }

I think it's wise to use strict equality for two reasons, first there is no reason not to and it's a good habit to have. Secondly this code handles testing and as such should be as robust as possible, even if it seems pedantic. Other modules which handle less sensitive areas can be more flexible in their approach.

In terms of the other points ideally I would rewrite the method in a similar way to this.

function stringify(value: unknown) {
  return globalThis.Deno ? Deno.inspect(value) : String(value);
}

/**
 * Format value to string for output to CLI on error.
 */
function format(value: unknown): string {
  if (typeof value === "string") {
    return `"${stringify(value)}"`;
  }
  return stringify(value);
}

This code is cleaner, clearer, all the assignment stuff is gone and each method is only doing one thing. This has a number of benefits, especially given a lot of business logic is hidden here globalThis.Deno ? Deno.inspect(value) : String(value); . Also as testing private methods in JavaScript is hacky I'd put most of the message business logic in its own module so it can be properly tested in isolation. This together would result in greater code confidence in this sensitive area.

I haven't done this though because that would be unreasonable given my knowledge of the project, and I don't wish to tread on any toes, just help where I can.

RobDWaller

comment created time in a month

Pull request review commentdenoland/deno

Bug fix for format method in asserts module

 Deno.test({     );   }, });++Deno.test({+  name: "failed with string contains quote",+  fn(): void {+    assertThrows(+      (): void =>+        assertEquals(+          'John said, "Hello!" to Dave.',+          'John said, "Hello" to Dave.'+        ),+      AssertionError,+      [+        "Values are not equal:",+        ...createHeader(),+        removed(`-   "John said, "Hello!" to Dave."`),

It doesn't generate a failed assertion as such, but if you look at the issue I raised #5590 it outputs escaping slashes for no benefit. This could lead to confusion when running tests where the inputted string to the test is unknown. The error message should be representative of what was inputted.

RobDWaller

comment created time in a month

PR opened denoland/deno

Bug fix for format method in asserts module

This PR fixes #5590

Within the format method of the asserts module the replace(/(?=["\\])/g, "\\")} expression is unnecessary due to the use of the template literal. It adds escaping slashes to quote marks within strings and this can generate misleading or confusing CLI output.

Additional Work

  • Adds comment to explain purpose of method.
  • There is no need to reassign the string variable.
  • Single letter parameters like v are generally regarded as a code smell.
  • There's no reason not to use the strict === operator on the typeof check.

Note: you could remove variable assignment entirely from this method if this statement was abstracted globalThis.Deno ? Deno.inspect(value) : String(value);.

+28 -4

0 comment

2 changed files

pr created time in a month

push eventRobDWaller/deno

RobDWaller

commit sha e8fb70ea09d561262d39d72d1e85d6012c2a705b

Added strict equality operator to typeof check as there is no reason not to have it.

view details

push time in a month

create barnchRobDWaller/deno

branch : bug-asserts-format-slashes

created branch time in a month

Pull request review commentdenoland/deno

Bug assert throws error

 export function assertThrows<T = void>(   try {     fn();   } catch (e) {+    if (e === undefined || e === null || typeof e.message === "undefined") {+      throw new AssertionError("Please throw a valid Error object.");+    }

@nayeemrmn were my fixes acceptable?

RobDWaller

comment created time in a month

push eventRobDWaller/deno

Kitson Kelly

commit sha 75bb9dbdfc7f8b4e8d17978808ae575e61843aef

Deno.bundle supports targets < ES2017. (#6328) This commit provides a "system_loader_es5.js" bundle loader which will be added to the bundle when the target is < ES2017, which is the minimum target syntax required for "system_loader.js". Supports #5913 (via Deno.bundle()) with a couple caveats: * Allowing "deno bundle" to take a different target is not supported, as we specifically ignore "target" when passed in a TypeScript config file. This is because deno bundle is really intended to generate bundles that work in Deno. It is an unintentional side effect that some bundles are loadable in browsers. * While a target of "es3" will be accepted, the module loader will still only be compatible with ES5 or later. Realistically no one should be expecting bundles generated by Deno to be used on IE8 and prior, and there is just too much "baggage" to support that at this point.

view details

Bartek Iwańczuk

commit sha e60922981be918ba4e6d9d857d9834b0d586df5b

Revert "Deno.bundle supports targets < ES2017. (#6328)" (#6342) This reverts commit 75bb9dbdfc7f8b4e8d17978808ae575e61843aef.

view details

Bartek Iwańczuk

commit sha 097e42418c6746a4f24e05effaf6a61df9509310

chore: move fmt test to integration tests (#6340)

view details

crowlKats

commit sha ebf5c7b8cc79d8d164d95927168067083debef27

Fix failure message for deno upgrade (#6348)

view details

Rob Waller

commit sha 02ef670deb8984988cf65338d205d51ae0b368cd

Feature testing assertions documentation (#6332)

view details

Kiffie Liversage

commit sha eea3223ade98a13ef4811e7d713df618375201d1

typo (#6356)

view details

River

commit sha 2a5af8b36b233b6330997b2262a45a23034d719d

fix: decode path properly on win32 (#6351)

view details

Chris Knight

commit sha 78a311aa5f6c56a750aaf3a7d3e8f911acf348d1

docs: Update standard library and testing manual pages (#6323)

view details

Chris Knight

commit sha 940f8e8433ae5ec74b2642438849089a0433e512

feat(std/log): expose logger name to LogRecord (#6316)

view details

Ryan Dahl

commit sha a2969ecd27645bafc7195baa7cfecbebfd8d2bf4

Deno.bundle supports targets < ES2017 (#6346) This commit provides a "system_loader_es5.js" bundle loader which will be added to the bundle when the target is < ES2017, which is the minimum target syntax required for "system_loader.js". Supports #5913 (via Deno.bundle()) with a couple caveats: * Allowing "deno bundle" to take a different target is not supported, as we specifically ignore "target" when passed in a TypeScript config file. This is because deno bundle is really intended to generate bundles that work in Deno. It is an unintentional side effect that some bundles are loadable in browsers. * While a target of "es3" will be accepted, the module loader will still only be compatible with ES5 or later. Realistically no one should be expecting bundles generated by Deno to be used on IE8 and prior, and there is just too much "baggage" to support that at this point. This is a minor variation of 75bb9d, which exposed some sort of internal V8 bug. Ref #6358 This is 100% authored by Kitson Kelly. Github might change the author when landing so I'm leaving this in: Co-authored-by: Kitson Kelly <me@kitsonkelly.com>

view details

Bartek Iwańczuk

commit sha 90c5dcfe79cd010b429e775a3ebcb3c5d78fa6ff

chore(test): move testing utilities to test_util crate (#6360)

view details

Bartek Iwańczuk

commit sha 70147ee56418c3d67a29070c01746a44d353e855

chore: share HTTP server between tests (#6362)

view details

Marcos Casagrande

commit sha 36ad5e44020a8bd48546e5a8bdb7db9c2f40dc52

refactor(cli/web): use isTypedArray method (#6369)

view details

Alan Gou

commit sha ffedbd79ad90bc88ef8c51d145536f68f50d4fea

build: lint cli/tests/unit using deno lint (#6327)

view details

uki00a

commit sha 345a5b3dff3a333d156bf4aff9f7e2a355d59746

fix: "deno test" should respect NO_COLOR=true (#6371)

view details

Bartek Iwańczuk

commit sha 826a3135b41bdaeb8c8cd27a4652563971b04baa

refactor(compiler): split code paths for compile and bundle (#6304) * refactor "compile" and "runtimeCompile" in "compiler.ts" and factor out separate methods for "compile" and "bundle" operations * remove noisy debug output from "compiler.ts" * provide "Serialize" implementations for enums in "msg.rs" * rename "analyze_dependencies_and_references" to "pre_process_file" and move it to "tsc.rs" * refactor ModuleGraph to use more concrete types and properly annotate locations where errors occur * remove dead code from "file_fetcher.rs" - "SourceFile.types_url" is no longer needed, as type reference parsing is done in "ModuleGraph" * remove unneeded field "source_path" from ".meta" files stored for compiled source file (towards #6080)

view details

Ryan Dahl

commit sha 5c8ce06c9223c71c6f5cf583cc6dd61d8f518290

upgrade: v8 to 8.5.104, rusty_v8 0.5.1 (#6377)

view details

Fallenhh

commit sha 1c5ab8bf1acf8347d39da13c2a9d59c9ba003f3c

refactor(cli/checksum): use map to generate hex string (#6382)

view details

Ryan Dahl

commit sha cddaacc955a8e0e0ab16298f9fad85af7efb1d03

upgrade crates (#6378)

view details

Ryan Dahl

commit sha bdf2d26ba1879b2ebeffd4b3a52e23e9254d4f05

v1.1.1

view details

push time in a month

created tagRobDWaller/explicitly

tag0.3.0

Additional assertions for Deno so developers can write more explicit unit tests.

created time in a month

release RobDWaller/explicitly

0.3.0

released time in a month

PR merged RobDWaller/explicitly

0.3.0 enhancement
  • created assertFloat assertions.
  • Created float module.
  • Updated README.
  • Updated date module error messages.
  • Updated equals method error message.
+223 -15

0 comment

8 changed files

RobDWaller

pr closed time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha 55ee2e8964513f5286c680d725ef1ad825803dd7

Created basic float equality check in equality module. Added tests too.

view details

RobDWaller

commit sha b5ae469221ca146f2c37d4c45b73f6bac016359a

Tidied up float method in equality module and added a failure test.

view details

RobDWaller

commit sha 57e7b065857ab0fca3e8c1a0163e9fa933dd61fc

Created float module to contain float assertion logic, added floor, fixedFloor and multiplier methods. Along with unit tests.

view details

RobDWaller

commit sha 5797c2a5e31d22619d7f10521b56b37fdf787e1b

Added ceiling method to float module along with happy path tests.

view details

RobDWaller

commit sha 2072e7ac7a32fb26c3185b66d53bb753cdf92fd8

Applied deno formatting fixes to float module and tests.

view details

RobDWaller

commit sha ef62cad7f4ad5fc6ed6f0728f13578222810c29a

Added some failing tests to float tests module.

view details

RobDWaller

commit sha ab9d83e801514644575c13a7f85b28dd8582475c

Removed float method from equality module as it has been replaced by float module. Removed associated tests from equality test module.

view details

RobDWaller

commit sha 03cc4a38667503207fe3038feacd5a148d52cd28

Added Round enum to float module and added some tests for it.

view details

RobDWaller

commit sha b9cff392d2d7928d85192829c7846bc04e42cbbe

Removed reference to float method in equaility tests as it no longer exists.

view details

RobDWaller

commit sha cc1045f9455b220508d605b5e52e4b7f9e9f9fc4

Improved efficiency of equal methods error message in equality module.

view details

RobDWaller

commit sha bba11e537fbeabe14b2609ea2c4405a539e24b86

Improved clarity of error messaging in float module.

view details

RobDWaller

commit sha 9bca5b51bfefcaff922ede2937c59d93e812eb47

Implemented assertFloat method in main module, along with associated tests.

view details

RobDWaller

commit sha ec38b089a3a5066e3eeb23c54587fd0c303b1e6d

Applied Deno Formating fixes to main module and float tests.

view details

RobDWaller

commit sha ce14d1831dc615f4f0ba8daf2cd51b71e7553389

Added assertFloat ceiling failure test.

view details

RobDWaller

commit sha e845724bb94efcfff0dadcbbf3a279afd07a1cfe

Created an example test for the assertFloat method.

view details

RobDWaller

commit sha 64a6e3d8870cdb16c6e691118ddabe79d94a2e16

Updated the README with information on the new assertFloat method.

view details

RobDWaller

commit sha 11461df1baf6eea831a514ef9a26824d74a949d6

Improved error messages in date module so they are clearer, updated assertion tests to match.

view details

Rob Waller

commit sha fd5b6379aacabe022b304e00e66b10e8942e8659

Merge pull request #3 from RobDWaller/0.3.0 0.3.0

view details

push time in a month

PR opened RobDWaller/explicitly

0.3.0 enhancement
  • created assertFloat assertions.
  • Created float module.
  • Updated README.
  • Updated date module error messages.
  • Updated equals method error message.
+223 -15

0 comment

8 changed files

pr created time in a month

push eventRobDWaller/explicitly

RobDWaller

commit sha e845724bb94efcfff0dadcbbf3a279afd07a1cfe

Created an example test for the assertFloat method.

view details

RobDWaller

commit sha 64a6e3d8870cdb16c6e691118ddabe79d94a2e16

Updated the README with information on the new assertFloat method.

view details

RobDWaller

commit sha 11461df1baf6eea831a514ef9a26824d74a949d6

Improved error messages in date module so they are clearer, updated assertion tests to match.

view details

push time in a month

create barnchRobDWaller/explicitly

branch : 0.3.0

created branch time in a month

Pull request review commentdenoland/deno

Bug assert throws error

 export function assertThrows<T = void>(   try {     fn();   } catch (e) {+    if (e === undefined || e === null || typeof e.message === "undefined") {+      throw new AssertionError("Please throw a valid Error object.");+    }

Just a note on this !(e instanceof Error), it generated a compilation error suggesting a Error | null would be returned, I assume this is a type narrowing issue.

RobDWaller

comment created time in 2 months

push eventRobDWaller/deno

RobDWaller

commit sha b5b6e926662ecd048d2c7a56278f58050142d63d

Improved non-Error object check so it is more efficient. !(e instanceof Error) led to a compilation error, possibly related to type narrowing.

view details

RobDWaller

commit sha 59de52742e1bb70d7177cbd517afbbbd96840d4a

Improved non-Error object error messages so they are clearer in assertThrows and assertThrowsAsync methods. Updated tests to match.

view details

RobDWaller

commit sha f937ff14809cf81c64e2737c2aa12dd2ede79c6f

Fixed line error on assertThrows comment and added comment to assertThrowsAsync method.

view details

push time in 2 months

Pull request review commentdenoland/deno

Bug assert throws error

 export function assertThrows<T = void>(   try {     fn();   } catch (e) {+    if (e === undefined || e === null || typeof e.message === "undefined") {+      throw new AssertionError("Please throw a valid Error object.");+    }

Both those points are fair, I have no idea why I didn't just check for the instance type. I'll fix it.

RobDWaller

comment created time in 2 months

push eventRobDWaller/deno

RobDWaller

commit sha 7f79d0a1a31a3751c662b343801fa17db6837e19

Removed happy path assertions from assertThrows and assertThrowsAsync non-Error object bug fix tests.

view details

push time in 2 months

Pull request review commentdenoland/deno

Bug assert throws error

 Deno.test({     );   }, });++Deno.test("Assert Throws Non-Error Fail", () => {+  assertThrows(+    () => {+      throw new Error("Panic!");+    },+    Error,+    "Panic!"+  );

Yep, sure. 👍

RobDWaller

comment created time in 2 months

PR opened denoland/deno

Feature testing assertions documentation

Adds Assertions documentation to a new Testing section of the documentation.

This is a first stab at the assertions documentation, which hopes to provide developers with a basic overview of the built in assertions functionality currently available.

Can be improved over time.

+198 -1

0 comment

2 changed files

pr created time in 2 months

push eventRobDWaller/deno

RobDWaller

commit sha ea74e4719b8a1c179659f19bb0f3607ea57db7b4

Tidied up new assertions documentation, added links and improved code examples, some spelling and grammar fixes.

view details

push time in 2 months

PR closed denoland/deno

Bug assert async throws std

Currently if a promise rejects you can get a run time error if you attempt to assert the message or content of the rejection using the message includes feature. This occurs when you pass in a string or number to the rejection rather than an error object.

+88 -0

2 comments

2 changed files

RobDWaller

pr closed time in 2 months

pull request commentdenoland/deno

Bug assert async throws

Closing this pull request as #6330 provides a better solution based on the conversations we've had here. Thank you @nayeemrmn for the help. 👍

RobDWaller

comment created time in 2 months

PR opened denoland/deno

Bug assert throws error

Currently you can cause cause run time errors in the assertThrows() and assertThrowsAsync() methods in the asserts module if you don't throw or reject a valid Error object. This happens when a developer attempts to assert the error message.

This code change enables this scenario to be captured and fail gracefully so the developer knows where they have gone wrong.

Is an improvement based on conversations in pull request #6314.

+105 -0

0 comment

2 changed files

pr created time in 2 months

create barnchRobDWaller/deno

branch : bug-assert-throws-error

created branch time in 2 months

Pull request review commentdenoland/deno

Bug assert async throws

 export async function assertThrowsAsync<T = void>(     }     if (       msgIncludes &&+      typeof e.message !== "undefined" &&       !stripColor(e.message).includes(stripColor(msgIncludes))     ) {       msg = `Expected error message to include "${msgIncludes}", but got "${         e.message       }"${msg ? `: ${msg}` : "."}`;       throw new AssertionError(msg);     }+    if (+      msgIncludes &&+      typeof e.message === "undefined" &&+      !stripColor(String(e)).includes(stripColor(msgIncludes))+    ) {+      msg = `Expected error message to include "${msgIncludes}", but got "${e}"${+        msg ? `: ${msg}` : "."+      }`;+      throw new AssertionError(msg);+    }

Will take a look into this then 👍

RobDWaller

comment created time in 2 months

push eventRobDWaller/deno

skdltmxn

commit sha b3c72d1e4554b5fd58cbf3ba2fbf56275446447b

feat(std/hash): reimplement all hashes in WASM (#6292)

view details

Rob Waller

commit sha b86514aa7e135437beffbe3e1f473f16967dabc4

docs: testing filter info (#6313)

view details

Vladimir Iakovlev

commit sha bd26a72ab3fc5b5f5403959ec081efdf8d39b666

Update assertions names in std/testing README (#6318)

view details

Bartek Iwańczuk

commit sha e88d72f101e773728c27306a3639589c1350e4ed

chore: remove glob dependency (#6317)

view details

push time in 2 months

Pull request review commentdenoland/deno

Bug assert async throws

 export async function assertThrowsAsync<T = void>(     }     if (       msgIncludes &&+      typeof e.message !== "undefined" &&       !stripColor(e.message).includes(stripColor(msgIncludes))     ) {       msg = `Expected error message to include "${msgIncludes}", but got "${         e.message       }"${msg ? `: ${msg}` : "."}`;       throw new AssertionError(msg);     }+    if (+      msgIncludes &&+      typeof e.message === "undefined" &&+      !stripColor(String(e)).includes(stripColor(msgIncludes))+    ) {+      msg = `Expected error message to include "${msgIncludes}", but got "${e}"${+        msg ? `: ${msg}` : "."+      }`;+      throw new AssertionError(msg);+    }

Sorry I think there is some confusion here.

I was referring to Promise.reject("some message"); Not throwing a string directly.

I was under the impression from the documentation the method assertThrowsAsync() is meant to handle Promise.reject(). So I'd expect it to handle the promise reject string scenario in some form. We have to assume developers will do this sort of thing.

It could be as I've outlined in my code where it attempts to parse the non-Error object as a message, or it could fail gracefully with some message like "Please throw or reject a valid Error object."

Maybe the latter is a better approach, but I'd argue some sort of fix should be applied.

RobDWaller

comment created time in 2 months

Pull request review commentdenoland/deno

Bug assert async throws

 export async function assertThrowsAsync<T = void>(     }     if (       msgIncludes &&+      typeof e.message !== "undefined" &&       !stripColor(e.message).includes(stripColor(msgIncludes))     ) {       msg = `Expected error message to include "${msgIncludes}", but got "${         e.message       }"${msg ? `: ${msg}` : "."}`;       throw new AssertionError(msg);     }+    if (+      msgIncludes &&+      typeof e.message === "undefined" &&+      !stripColor(String(e)).includes(stripColor(msgIncludes))+    ) {+      msg = `Expected error message to include "${msgIncludes}", but got "${e}"${+        msg ? `: ${msg}` : "."+      }`;+      throw new AssertionError(msg);+    }

Rejecting a Promise with a string isn't an unreasonable thing to do though.

RobDWaller

comment created time in 2 months

pull request commentdenoland/deno

Bug assert async throws

@nayeemrmn can do, but do you think it should be in a separate pull request? Keep things encapsulated.

RobDWaller

comment created time in 2 months

more