Giter Site home page Giter Site logo

dmitriz / min-karma Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 1.38 MB

Minimal Karma Runner Setup and Package in one --- Start testing now!

Home Page: https://www.npmjs.com/package/min-karma

License: MIT License

JavaScript 100.00%
karma test-runner minimal-setups angularjs

min-karma's Introduction

min-karma

Minimal Karma runner Setup and Package — Start testing now!

npm version Build Status Code Climate Dependency Status Commitizen friendly

PRs Welcome MIT License npm downloads

js-standard-style

Other minimal setup

Karma

Karma is a JavaScript Test Runner, one of the most popular and friendliest for beginners. The most notable advantage of Karma is testing in real browsers. See my StackOverflow answer for more information about Karma usage.

On the AngularJS team, we rely on testing and we always seek better tools to make our life easier. That's why we created Karma - a test runner that fits all our needs.

Why?

  • Many setups are bloated with unnecessary options and packages.
  • Start clean and minimal and extend as you go.
  • Add single package to your project instead of many, to get your tests up and running.

Use cases

Features

  • Minimal functional Karma config file.
  • Use as repository (git clone) or package (npm install).
  • Installs all testing packages as dependencies, no need to install them manually.
  • Includes Chrome and Firefox launchers (but many other browsers are also supported).
  • Automatically and gracefully (without overwriting) copied to your project directory via gently-copy:
    • Basic testing example inside demo folder.

    • Minimal functional configuration file karma.conf.js (will not install if karma.conf.js is already present):

      module.exports = function (config) {
        config.set({
          frameworks: ['jasmine'],
          files: [
            'demo/**/*.js'
          ],
          browsers: ['Chrome']
        })
      }

If you are new to Node

Download and Install Node.js, see How do I get started with Node.js for more information.

To use as separate Repository:

Clone

git clone https://github.com/dmitriz/min-karma

or simply Download this Repository, unzip it and cd min-karma-master.

Install dependencies

npm install --save-dev

To use as Package (add to your project):

In your main project directory (should contain package.json):

npm install min-karma --save

Getting started

Run your tests:

karma start

Now try to edit files inside demo folder and see how karma is watching and updating your test results.

Basic testing demo — inside demo folder

// function to test
function add (a, b) {
  return a + b
}

// the test
describe('Addition', function () {
  it('should add numbers', function () {
    expect(add(2, 4)).toBe(6)
    expect(add(2, 4)).not.toBe(2)
  })
})

Tip. Keep your tests next to their testees for better cohesion. Avoid putting them into separate folders (like tests) away from your code.

Enjoy! 🎉

min-karma's People

Contributors

davidjbradshaw avatar dependabot[bot] avatar depfu[bot] avatar dmitriz avatar greenkeeper[bot] avatar greenkeeperio-bot avatar renovate-bot avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

min-karma's Issues

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.map:4.6.0

Vulnerabilities

DepShield reports that this application's usage of lodash.map:4.6.0 results in the following vulnerability(s):


Occurrences

lodash.map:4.6.0 is a transitive dependency introduced by the following direct dependency(s):

cz-conventional-changelog:2.1.0
        └─ lodash.map:4.6.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

An in-range update of snyk is breaking the build 🚨

The dependency snyk was updated from 1.230.5 to 1.230.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.230.6

1.230.6 (2019-10-04)

Bug Fixes

  • add packed dependency to prevent download from git (c918814)
Commits

The new version differs by 4 commits.

  • e6568ec Merge pull request #797 from snyk/test/remove-bad-test
  • f365660 test: skip test that uses previous bad version
  • 0c6026e Merge pull request #795 from snyk/fix/https-agent-vuln
  • c918814 fix: add packed dependency to prevent download from git

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of karma is breaking the build 🚨

The dependency karma was updated from 4.2.0 to 4.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

karma is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.3.0

Bug Fixes

Features

Commits

The new version differs by 13 commits.

  • fa6be15 chore: release v4.3.0
  • 0ed9eba chore: update contributors
  • 5f13e11 fix(server): Simplify 'dom' inclusion. (#3356)
  • 817fbbd feat(config): socket.io server pingTimeout config option. (#3355)
  • c5f3560 feat(preprocessor): preprocessor_priority execution order. (#3303)
  • 6c5add2 fix(build): switch from yarn to package-lock.json (#3351)
  • 1c6c690 fix(travis): Pin to trusty (#3347)
  • 62d4c5a feat(runner):
  • 582a406 fix(config): Simpilfy error proceesing. (#3345)
  • 1489e9a fix(test): test:client silently failing on Travis (#3343)
  • 094bcc6 chore(deps): npm install karma-browserstack-launcher (#3344)
  • 5614c04 fix(deps): lodash update. (#3341)
  • 177e2ef feat(async): frameworks can be loaded asynchronously (#3297)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Depfu Error: No dependency files found

Hello,

We've tried to activate or update your repository on Depfu and couldn't find any supported dependency files. If we were to guess, we would say that this is not actually a project Depfu supports and has probably been activated by error.

Monorepos

Please note that Depfu currently only searches for your dependency files in the root folder. We do support monorepos and non-root files, but don't auto-detect them. If that's the case with this repo, please send us a quick email with the folder you want Depfu to work on and we'll set it up right away!

How to deactivate the project

  • Go to the Settings page of either your own account or the organization you've used
  • Go to "Installed Integrations"
  • Click the "Configure" button on the Depfu integration
  • Remove this repo (dmitriz/min-karma) from the list of accessible repos.

Please note that using the "All Repositories" setting doesn't make a lot of sense with Depfu.

If you think that this is a mistake

Please let us know by sending an email to [email protected].


This is an automated issue by Depfu. You're getting it because someone configured Depfu to automatically update dependencies on this project.

Getting more done in GitHub with ZenHub

Hola! @dmitriz has created a ZenHub account for the dmitriz organization. ZenHub is the leading team collaboration and project management solution built for GitHub.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • “+1” button for GitHub issues and comments;
  • Drag-and-drop file sharing;
  • Time-saving shortcuts like a quick repo switcher.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @dmitriz.

ZenHub Board

An in-range update of jasmine-core is breaking the build 🚨

The dependency jasmine-core was updated from 3.4.0 to 3.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

jasmine-core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 117 commits.

  • 99799f7 Still need some ruby stuff around to release the jasmine-core gem
  • e8263e3 bump version to 3.5.0
  • 53561ae Show details of syntax (etc) errors when loading Jasmine's own specs
  • 68f25a7 Don't create env instances in beforeEach
  • 96ba66a Built distribution
  • ba4a8d1 Fixed jsdocs
  • 65d9e93 Removed broken & long-disabled JsApiReporter integration specs
  • 2d3ac38 toBeRejectedWithError can expect the error to be Error, not just a subtype
  • 5a219da Added basic integration tests for all built-in matchers
  • f056f3b Fixed indentation
  • aeb0b73 Merge branch 'dtychshenko-1740-fail-on-no-expectations'
  • 7263a38 Adds new configuration option to failSpecWithNoExpectations that will report specs without expectations as failures if enabled
  • e8870db Merge branch 'fix-missing-asynchronous-stacktrace' of https://github.com/prantlf/jasmine into prantlf-fix-missing-asynchronous-stacktrace
  • 35d1508 Show argument diffs in toHaveBeenCalledWith failure messages
  • 19292e4 Stop testing against PhantomJS

There are 117 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of karma-chrome-launcher is breaking the build 🚨

The dependency karma-chrome-launcher was updated from 3.0.0 to 3.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

karma-chrome-launcher is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v3.1.0

Features

  • add --disable-dev-shm-usage flag to headless (137005d)
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of karma-firefox-launcher is breaking the build 🚨

The dependency karma-firefox-launcher was updated from 1.1.0 to 1.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

karma-firefox-launcher is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 13 commits.

  • a398dae chore(release): 1.2.0
  • c1a3939 fix: Detect and kill browser process when launcher process is being used (#103)
  • c3fea39 chore: Update dependencies
  • 2e94873 chore: Add missing is-wsl entry to yarn.lock
  • b4e260e feat: Add support for running Windows Firefox from WSL
  • 2443631 chore: Add self to contributors
  • 2dca609 chore: Update dev dependencies
  • 16e6673 chore: Sort contributors list [skip ci]
  • 9e86d04 chore: Drop support for Node 6 (#98)
  • 540c1dd fix: Add -wait-for-browser
  • 6377ee3 fix: Look for other paths for Firefox Nightly on Windows and Mac
  • b9455c8 chore: Fix travis (#97)
  • 0e37f76 feat(headless): add enable remote debugging by default

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

[DepShield] (CVSS 7.5) Vulnerability due to usage of debug:2.6.9

Vulnerabilities

DepShield reports that this application's usage of debug:2.6.9 results in the following vulnerability(s):


Occurrences

debug:2.6.9 is a transitive dependency introduced by the following direct dependency(s):

karma:4.1.0
        └─ body-parser:1.19.0
              └─ debug:2.6.9
        └─ braces:2.3.2
              └─ snapdragon:0.8.2
                    └─ debug:2.6.9
        └─ chokidar:2.1.6
              └─ anymatch:2.0.0
                    └─ micromatch:3.1.10
                          └─ extglob:2.0.4
                                └─ expand-brackets:2.1.4
                                      └─ debug:2.6.9
        └─ connect:3.7.0
              └─ debug:2.6.9
              └─ finalhandler:1.1.2
                    └─ debug:2.6.9

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.