• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / stories-backend / 7872789705
47%

Build:
DEFAULT BRANCH: main
Ran 12 Feb 2024 01:56PM UTC
Jobs 1
Files 21
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Feb 2024 01:55PM UTC coverage: 49.731%. Remained the same
7872789705

push

github

web-flow
Refactor DB scripts (#106)

* Access error directly via variable

* Remove unnecesary 'if' clause

The default value of a string variable is already an empty string, and
there was no additional error handling done.

* Move printing logic to main script

Allows for better abstraction and improves reusability.

* Refactor to use common DB "connect" helper

Reduces code duplication.

* Refactor to use common DB "close" helper

* Rename `d` to `dbConn`

Makes the name more descriptive.

* Add comment

* Replace string with constants

Prevents bugs.

* Rename `getConnectedDBName` to `getDBName`

* Change createDB signature

Hides implementation details of the config object as the function only
needs to be aware of the database name to create, not how it is derived
from.

* Change dropDB signature

Similar to createDB, this improves abstraction.

* Refactor script setup to separate function

Improves single responsibility.

* Simplify dropDB implementation

* Refactor createDB implementation

* Move happy path to outside if condition
* Simplify error handling
* Update logging behavior

* Update log colors

* Remove unnecessary code

277 of 557 relevant lines covered (49.73%)

0.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7872789705.1 12 Feb 2024 01:56PM UTC 21
49.73
GitHub Action Run
Source Files on build 7872789705
  • Tree
  • List 21
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #7872789705
  • f369819c on github
  • Prev Build on main (#7812642533)
  • Next Build on main (#7872825939)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc