# karma-seajs

> A Karma plugin, Adapter for seajs

Latest version **0.1.1** (published 2014-07-09) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install karma-seajs
pnpm add karma-seajs
yarn add karma-seajs
bun add karma-seajs
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-07-09 |
| First published | 2014-07-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | gsmlg |
| Maintainers | gsmlg |
| Keywords | karam-plugin, karma-adapter, seajs |

## Links

- npm: https://www.npmjs.com/package/karma-seajs
- Repository: https://github.com/gsmlg/karma-seajs
- Issues: https://github.com/gsmlg/karma-seajs/issues
- npm.io page: https://npm.io/package/karma-seajs

## Dependencies (1)

- [seajs](https://npm.io/package/seajs.md) ^2.3.0

## Recent versions

- 0.1.1 (latest) — 2014-07-09
- 0.1.0 — 2014-07-09

## README

karma-seajs
================
install
```
npm install --save-dev karma-seajs
```

settings in karma conf
```
{
  frameworks: ['jasmine', 'seajs'],
  files: [
    {pattern: 'vendor/**/*.js', included: false, watched: false},
    {pattern: 'src/**/*.js', included: false},
    {pattern: 'test/**/*spec.js', included: false},
    'test/test-main.js'
  ]
}
```

test-main.js
```
(function(__karma__, seajs) {
    var tests = [],
        file;
    var alias = {
        "jquery": "/base/vendor/jquery",
        "underscore": "/base/vendor/underscore",
        "backbone": "/base/vendor/backbone",
        "d3": "/base/vendor/d3"
    };
    for (file in __karma__.files) {
        if (__karma__.files.hasOwnProperty(file)) {
            if (/spec\.js$/i.test(file)) {
                tests.push(file);
            }
            if (/\/src\//.test(file)) {
                var name = file.match(/\/src\/([^.]+)\.js/)[1];
                alias[name] = file;
            }
        }
    }
    seajs.config({
        base: '/base/src',
        alias: alias
    });
    var __start = __karma__.start;
    __karma__.start = function() {};
    seajs.use(tests, function() {
        __start.call();
    });
})(window.__karma__, seajs);

```

---
_Source: https://npm.io/package/karma-seajs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
