How to use the source-map-support.install function in source-map-support

To help you get started, we’ve selected a few source-map-support examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dlang-vscode / dlang-vscode / test / index.ts View on Github external
function run(testsRoot, clb): any {
    // Enable source map support
    require("source-map-support").install();

    // Read configuration for the coverage file
    let coverOptions: ITestRunnerOptions = _readCoverOptions(testsRoot);
    if (coverOptions && coverOptions.enabled) {
        // Setup coverage pre-test, including post-test hook to report
        let coverageRunner = new CoverageRunner(coverOptions, testsRoot, clb);
        coverageRunner.setupCoverage();
    }

    // Glob test files
    glob("**/**.test.js", { cwd: testsRoot }, (error, files): any => {
        if (error) {
            return clb(error);
        }
        try {
            // Fill into Mocha
github CommonGarden / Grow-IoT / build / test-bundle.js View on Github external
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var Thing = _interopDefault(require('Thing.js'));

require("source-map-support").install();
global.expect = require('chai').expect;

(function setup() {
  beforeEach(function () {

    // Setup test things
    // In the future we can test multiple different kinds of things!
    global.thing1 = {
      name: 'Light', // The display name for the thing.
      desription: 'An LED light with a basic on/off api.',
      // The username of the account you want this device to be added to.
      username: 'jake2@gmail.com',
      // Properties can be updated by the API
      properties: {
        state: 'off'
      },
github ShieldBattery / ShieldBattery / js / app.js View on Github external
import path from 'path'
import mkdirp from 'mkdirp'

if (process.env.NODE_ENV === 'development') {
  require('source-map-support').install({ handleUncaughtExceptions: false })
}

if (process.env.ProgramData) {
  // We use our ProgramData folder for lots of stuff, so ensure its created before anything else
  // runs
  mkdirp.sync(path.join(process.env.ProgramData, 'shieldbattery'), 0o777)
}

import 'babel-polyfill'

// $  
github mmckegg / mutant / test / computed.js View on Github external
require('setimmediate')
require('source-map-support').install()

var test = require('tape')

var computed = require('../computed')
var resolve = require('../resolve')
var Value = require('../value')

test('computed get accessor', function(t) {
  var value = Value(1)
  var obs = computed(value, x => x * 100)
  t.equal(resolve(obs), 100)
  value.set(2)
  t.equal(resolve(obs), 200)
  t.end()
})
github robey / font-problems / test / src / test_bitmap_font.js View on Github external
"use strict";

const bitmap_font = require("../../lib/bitmap_font");
const bmp = require("../../lib/bmp");
const framebuffer = require("../../lib/framebuffer");
const util = require("util");

require("should");
require("source-map-support").install();

describe("BitmapFont", () => {
  const f = new framebuffer.Framebuffer(8, 8, 32);
  f.fill(0xffffff);
  f.putPixel(0, 0, 0);
  f.putPixel(5, 1, 0);
  f.putPixel(2, 4, 0);
  f.putPixel(1, 5, 0);
  f.putPixel(7, 7, 0);

  it("reads a normal cell", () => {
    const font = new bitmap_font.BitmapFont();
    const cell = font.getFromFramebuffer(32, f, 0, 0, 6, 6);
    font.cellHeight.should.eql(6);
    font.cellWidth(32).should.eql(6);
    Array.prototype.slice.call(cell).should.eql([
github shakyShane / actor-js / test / context.scheduler.ts View on Github external
require('source-map-support').install();
const { assert } = require('chai');
const {delay, map, tap} = require('rxjs/operators');
const { createSystem } = require('../');
const { TestScheduler } = require('@kwonoj/rxjs-testscheduler-compat');
const { SystemActor } = require('../dist/SystemActor');
const { System } = require('../dist/System');
const { patterns } = require('../');

describe('context.scheduler', function () {
    it('gives actors access to the message scheduler via context', function () {
        const scheduler = new TestScheduler();
        const system = createSystem({
            messageScheduler: scheduler
        });
        const calls = [];
        const Child = function(address, {scheduler}) {
github faastjs / faast.js / src / cli.ts View on Github external
#!/usr/bin/env node

require("source-map-support").install();

import { Request as AWSRequest, AWSError } from "aws-sdk";
import * as commander from "commander";
import { readdir, remove } from "fs-extra";
import { GaxiosPromise, GaxiosResponse } from "gaxios";
import { google } from "googleapis";
import ora from "ora";
import { tmpdir } from "os";
import * as path from "path";
import * as awsFaast from "./aws/aws-faast";
import { caches, PersistentCache } from "./cache";
import * as googleFaast from "./google/google-faast";
import { keysOf, uuidv4Pattern } from "./shared";
import { throttle } from "./throttle";

const warn = console.warn;
github L2jLiga / fastify-decorators / bin / start.js View on Github external
/**
 * @license
 * Copyright Andrey Chalkin  (https://github.com/L2jLiga). All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/L2jLiga/fastify-decorators/blob/master/LICENSE
 */

require('source-map-support').install();

const instance = require('../dist/server').instance;

instance.listen(3000, (err) => {
    if (err) {
        throw err;
    }

    console.log(`Application is ready and listening on http://localhost:3000`);
    console.log(`Available routes:`);
    console.log(instance.printRoutes());
});
github nicolas-schmitt / multi-git / npm-scripts.js View on Github external
'use strict';

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
require('source-map-support').install();

var action = process.argv[2];
var argv = process.argv.slice(3);
var valet = _interopRequireDefault(require('./build/valet')).default;

switch (action) {
    case 'install':
        valet.helpInstall(argv);
        break;

    default:
        console.warn('unknown action');
        break;
}
github denali-js / core / blueprints / app / files / __name__ / app / index.js View on Github external
import sourcemaps from 'source-map-support';
import path from 'path';
import Application from './application';

sourcemaps.install();

let application = new Application({
  environment: process.env.NODE_ENV || 'development',
  dir: path.dirname(__dirname)
});

application.start();

export default application;

source-map-support

Fixes stack traces for files with source maps

MIT
Latest version published 3 years ago

Package Health Score

71 / 100
Full package analysis

Similar packages