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

@stylable/core-test-kit

Package Overview
Dependencies
Maintainers
5
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/core-test-kit - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

8

cjs/diagnostics.js

@@ -75,3 +75,3 @@ "use strict";

const result = generate_test_util_1.generateFromMock(config, diagnostics);
const warningMessages = diagnostics.reports.map(d => d.message);
const warningMessages = diagnostics.reports.map((d) => d.message);
if (expectedWarnings.length === 0 && diagnostics.reports.length !== 0) {

@@ -97,3 +97,3 @@ chai_1.expect(expectedWarnings.length, `expected no diagnostics but received ${JSON.stringify(warningMessages, null, 2)}`).to.equal(diagnostics.reports.length);

});
chai_1.expect(expectedWarnings.length, `expected diagnostics: ${JSON.stringify(expectedWarnings.map(d => d.message), null, 2)}, but received ${JSON.stringify(warningMessages, null, 2)}`).to.equal(diagnostics.reports.length);
chai_1.expect(expectedWarnings.length, `expected diagnostics: ${JSON.stringify(expectedWarnings.map((d) => d.message), null, 2)}, but received ${JSON.stringify(warningMessages, null, 2)}`).to.equal(diagnostics.reports.length);
return result;

@@ -104,6 +104,6 @@ }

const processReports = meta.diagnostics.reports;
chai_1.expect(processReports.length, `processing diagnostics: ${processReports.map(r => r.message)}`).to.equal(0);
chai_1.expect(processReports.length, `processing diagnostics: ${processReports.map((r) => r.message)}`).to.equal(0);
if (meta.transformDiagnostics && checkTransformDiagnostics) {
const transformerReports = meta.transformDiagnostics.reports;
chai_1.expect(transformerReports.length, `transforming diagnostics: ${transformerReports.map(r => r.message)}`).to.equal(0);
chai_1.expect(transformerReports.length, `transforming diagnostics: ${transformerReports.map((r) => r.message)}`).to.equal(0);
}

@@ -110,0 +110,0 @@ }

@@ -15,3 +15,3 @@ "use strict";

return meta;
}, fs, x => (x.startsWith('./') || path_1.isAbsolute(x) ? x : '/node_modules/' + x));
}, fs, (x) => (x.startsWith('./') || path_1.isAbsolute(x) ? x : '/node_modules/' + x));
const resolver = new core_1.StylableResolver(fileProcessor, requireModule);

@@ -30,3 +30,3 @@ return { resolver, requireModule, fileProcessor };

postProcessor,
mode: config.mode
mode: config.mode,
});

@@ -60,3 +60,3 @@ }

diagnostics: new core_1.Diagnostics(),
keepValues: false
keepValues: false,
}).transform(meta).meta;

@@ -63,0 +63,0 @@ };

@@ -9,3 +9,3 @@ "use strict";

// expect(rule.selector, `${msg ? msg + ' ' : ''}selector ${selectorIndex}`).to.equal(selector);
const actualDecl = rule.nodes.map(x => x.toString()).join(';');
const actualDecl = rule.nodes.map((x) => x.toString()).join(';');
if (actualDecl !== decl) {

@@ -12,0 +12,0 @@ throw new Error(`${msg ? msg + ' ' : ''}selector ${selectorIndex} declaration\nactual: ${actualDecl}\nexpected: ${decl}`);

{
"name": "@stylable/core-test-kit",
"version": "3.4.0",
"version": "3.4.1",
"description": "Stylable core test-kit",

@@ -14,3 +14,3 @@ "main": "./cjs/index.js",

"dependencies": {
"@stylable/core": "^3.4.0",
"@stylable/core": "^3.4.1",
"chai": "^4.2.0",

@@ -34,3 +34,3 @@ "flat": "^5.0.0",

"license": "BSD-3-Clause",
"gitHead": "af5fcd5514c9364e8fdd6fda29585ae4ea1b27e1"
"gitHead": "396407607f59f09f3f07826b6028a6274371db45"
}

@@ -88,3 +88,3 @@ import { Diagnostics, process, safeParse, StylableMeta, StylableResults } from '@stylable/core';

const result = generateFromMock(config, diagnostics);
const warningMessages = diagnostics.reports.map(d => d.message);
const warningMessages = diagnostics.reports.map((d) => d.message);

@@ -126,3 +126,3 @@ if (expectedWarnings.length === 0 && diagnostics.reports.length !== 0) {

`expected diagnostics: ${JSON.stringify(
expectedWarnings.map(d => d.message),
expectedWarnings.map((d) => d.message),
null,

@@ -141,3 +141,3 @@ 2

processReports.length,
`processing diagnostics: ${processReports.map(r => r.message)}`
`processing diagnostics: ${processReports.map((r) => r.message)}`
).to.equal(0);

@@ -149,5 +149,5 @@ if (meta.transformDiagnostics && checkTransformDiagnostics) {

transformerReports.length,
`transforming diagnostics: ${transformerReports.map(r => r.message)}`
`transforming diagnostics: ${transformerReports.map((r) => r.message)}`
).to.equal(0);
}
}

@@ -14,3 +14,3 @@ import {

StylableResults,
StylableTransformer
StylableTransformer,
} from '@stylable/core';

@@ -60,3 +60,3 @@ import { isAbsolute } from 'path';

fs,
x => (x.startsWith('./') || isAbsolute(x) ? x : '/node_modules/' + x)
(x) => (x.startsWith('./') || isAbsolute(x) ? x : '/node_modules/' + x)
);

@@ -84,3 +84,3 @@

postProcessor,
mode: config.mode
mode: config.mode,
});

@@ -129,3 +129,3 @@ }

diagnostics: new Diagnostics(),
keepValues: false
keepValues: false,
}).transform(meta).meta;

@@ -132,0 +132,0 @@ };

@@ -19,3 +19,3 @@ import postcss from 'postcss';

// expect(rule.selector, `${msg ? msg + ' ' : ''}selector ${selectorIndex}`).to.equal(selector);
const actualDecl = rule.nodes!.map(x => x.toString()).join(';');
const actualDecl = rule.nodes!.map((x) => x.toString()).join(';');
if (actualDecl !== decl) {

@@ -22,0 +22,0 @@ throw new Error(

@@ -6,5 +6,5 @@ import { expect } from 'chai';

const { flag } = util;
chai.Assertion.addMethod('flatMatch', function(obj: {}, maxDepth = 5) {
chai.Assertion.addMethod('flatMatch', function (obj: {}, maxDepth = 5) {
expect(flatten(flag(this, 'object'), { maxDepth })).to.contain(flatten(obj));
});
}

@@ -5,3 +5,3 @@ import { expect } from 'chai';

const { flag } = util;
chai.Assertion.addMethod('matchCSS', function(this: any, css: string | string[]) {
chai.Assertion.addMethod('matchCSS', function (this: any, css: string | string[]) {
let element = flag(this, 'object');

@@ -8,0 +8,0 @@ if (!Array.isArray(css)) {

@@ -8,3 +8,3 @@ import { StylableResults } from '@stylable/core';

chai.Assertion.addMethod('mediaQuery', function(this: any, index: number) {
chai.Assertion.addMethod('mediaQuery', function (this: any, index: number) {
const actual = flag(this, 'object') as StylableResults;

@@ -44,3 +44,3 @@

chai.Assertion.addMethod('styleRules', function(
chai.Assertion.addMethod('styleRules', function (
this: any,

@@ -47,0 +47,0 @@ styleRules: string[] | { [key: number]: string }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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