Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma-dart

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-dart - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

chrome-extension/background.js

23

lib/index.js

@@ -34,3 +34,3 @@ var fs = require('fs');

var initDartUnittest = function(files, webServer, customFileHandlers,
customScriptTypes) {
customScriptTypes, karmaDartImports) {
customScriptTypes.push({

@@ -41,2 +41,17 @@ extension: 'dart',

var imports = {
unittest: 'package:unittest/unittest.dart',
js: 'package:js/js.dart'
};
if (karmaDartImports) {
Object.keys(karmaDartImports).forEach(function(library) {
imports[library] = karmaDartImports[library];
});
}
var adapterImports = '';
Object.keys(imports).forEach(function(library) {
adapterImports += 'import "' + imports[library] + '" as ' + library + ';\n';
});
// We monkey-patch webServer.updateFilesPromise and modify the list of

@@ -80,3 +95,5 @@ // included files to remove dart test files, and add the adapter file.

response, function(data, response) {
return data.replace('/*%TEST_IMPORTS%*/', imports.join('\n'))
return data
.replace('/*%ADAPTER_IMPORTS%*/', adapterImports)
.replace('/*%TEST_IMPORTS%*/', imports.join('\n'))
.replace('/*%TEST_MAIN_CALLS%*/', mainCalls.join('\n'));

@@ -101,3 +118,3 @@ });

initDartUnittest.$inject = ['config.files', 'webServer', 'customFileHandlers',
'customScriptTypes'];
'customScriptTypes', 'config.karmaDartImports'];

@@ -104,0 +121,0 @@ module.exports = {

2

package.json
{
"name": "karma-dart",
"version": "0.1.1",
"version": "0.1.2",
"description": "A Karma plugin - adapter for Dart unittest testing framework.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc