npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

glace-core

v2.0.6

Published

GlaceJS minimal functional testing framework

Downloads

497

Readme

Build Status | Source Code | Release Notes

Glace (fr. glacé — ice, frozen) is a cold drink based on coffee with addition of ice cream.

glace-core is a quick-start functional & unit testing framework based on mochajs and can be extented with its plugins.

Why it is

  • Firstly it's R&D project for me to dive deeply to programming and software architecture.
  • Current testing frameworks like mochajs or jasminejs look cool for unit testing but are not flexible for complex functional scenarios.

Quick start

  1. Make sure you have installed node >= v8.9 & npm >= v5.5.

  2. Install glace-core globally npm i -g glace-core or locally npm i glace-core.

  3. Create file tests.js with next content:

    "use strict";
    
    test("My first test", () => {
        chunk(() => {
            console.log("hello world");
        });
    });
    
    test("My second test", () => {
        chunk(() => {
            throw new Error("BOOM!");
        });
    });
  4. Launch tests with command glace tests.js if you installed glace-core globally or with ./node_modules/glace-core/bin/glace tests.js if locally and get the result.

Features

Reserved functions

  • test - testcase definition;
  • chunk - part of test executed independently;
  • before - hook executed before chunks;
  • after - hook executed after chunks;
  • beforeChunk - hook executed before each chunk;
  • afterChunk - hook executed after each chunk;
  • $ - namespace of steps;
  • CONF - configuration;
  • fixtures - modular & reusable blocks of test;
  • iterators - cycles for tests, chunks and other blocks;
  • suite - groups tests to suites for visual output mostly;
  • scope - groups tests or chunks for visual or logical output, is used inside iterators also;
  • session - first root suite, created by framework, not need to reuse by default.

CLI options

Common

  • --version - Show version.
  • -h, --help - Show help.

Arguments

  • --config [path], -c - Path to JSON file with CLI arguments. Default is <cwd>/config.json if it exists.

Note! All options below may be set via json file (see option --config above).

Log

  • --stdout-log - Print log messages to stdout.
  • --log [path] - Path to log file. Default is <cwd>/glace.log.
  • --log-level [level] - Log level. Supported values are error, warn, info, verbose, debug, silly. Default is debug.

Core

  • --user-config [path] - Path to JS file with configuration which will be merged with override default configuration. Default is <cwd>/config.js if it exists.
  • --session-name [name] - Tests run session name. Default value includes word session and datetime.
  • --grep <pattern>, -g - Filter tests by part of name (powered by mocha).
  • --include <sequence> - 1) Sequence of test name parts separated by | in order to choose tests for run, case-insensitive. For example, --include "my first test | my second test" includes these ones in run only. 2) Path to json file with test names or test ids in order to choose them for run. For example, it can be path to file with failed tests, which is generated glace-core if some tests were failed.
  • --exclude <sequence> - 1) Sequence of test name parts separated by | in order to exclude tests from run, case-insensitive. For example, --exclude "my first test | my second test" excludes these ones from run. 2) Path to json file with test names or test ids in order to exclude them from run.
  • --precise-match - Precise tests inclusion or exclusion matching (check full test name equivalence, not substring matching).
  • --report [path] - Path to report folder. Default is <cwd>/report.
  • --dont-clear-report - Don't clear folder of previous report before tests run.
  • --dont-check-names - Don't check test names uniqueness (usually useful in unit testing). By default test names should be human-readable and unique among other tests in run.
  • --failed-tests-path [path] - Path to save failed tests in json format. Default is <cwd>/report/failed-tests.json. If there are failed tests in run, glace-core puts its info to json file, which can be used then with --include option to rerun failed tests only.
  • --root-conftest <path> - Path to root conftest.js which will be loaded before tests but after preloads.
  • --languages <sequence> - List of tested languages separated with comma. For example, --languages "ru, en, ee".
  • --retry [times] - Number of times to retry failed test. Default is 0.
  • --chunk-retry [times] - Number of times to retry failed chunk (powered by mocha). Default is 0.
  • --chunk-timeout [sec] - Time to execute chunk or hook, sec. Default is 180.
  • --uncaught [type] - Strategy to process uncaught exceptions. Default value is log. Supported values are log just to log uncaught exceptions, fail to fail test if uncaught exception happened, mocha to use default mocha mechanism (unreliable).
  • --kill-procs <sequence> - List of process names separated with comma, which will be killed before tests run, case-sensitive. For example, --kill-procs "java, chrome, selenium".
  • --debug-on-fail - Enter to interactive debug mode on step failure. Incompatible with --slaves option.
  • --exit-on-fail - Finish tests run on first failure.
  • --dots - Print dots instead of test & chunk names.
  • --errors-now - Print error message immediately when it happened.
  • --deep-errors - Print deep objects structure in error message.
  • --interactive, -i - Launch interactive mode to execute steps manually in terminal. Incompatible with --slaves option.
  • --slaves <number|auto> - Split tests by slaves and execute them concurrently in separated processes. If it is auto, slaves amount will be equal to processor cores amount.

Plugins

  • --list-plugins - List found plugins and exit.
  • --plugins-dir [path] - Path to custom plugins folder.
  • --disable-default-plugins - Disable default (autodiscovered) plugins.

xUnit

  • --xunit - Activate xUnit reporter.
  • --xunit-path [path] - Path to xUnit report. Default is <cwd>/report/xunit.xml.
  • --xunit-suite-name [name] - Tests suite name in xUnit report. By default it's the same as session name.

Allure

  • --allure - Activate Allure reporter.
  • --allure-dir [path] - Path to allure reports folder. Default is <cwd>/report/allure.

TestRail

  • --testrail - Activate TestRail reporter.
  • --testrail-host <host> - TestRail host.
  • --testrail-user <user> - TestRail username or email.
  • --testrail-token <token> - TestRail token.
  • --testrail-project-id <id> - TestRail project id.
  • --testrail-suite-id <id> - TestRail suite id.
  • --testrail-run-name <name> - TestRail run name.
  • --testrail-run-desc <description> - TestRail run description.

Tools

  • --testrail-check - Check TestRail cases consistency with implemented tests.
  • --list-steps [filter] - List available steps and exit. If filter is omitted, list all steps.
  • --list-tests [filter] - List collected tests and exit. If filter is omitted, list all tests.
  • --list-fixtures [filter] - List available fixtures and exit. If filter is omitted, list all fixtures.

Examples

There are e2e tests in order to explore glace-core examples.

Quality

glace-core is highly reliable framework. And it's ready to provide confirmation:

  • release tests report
  • release code coverage