Skip to content

Commit

Permalink
Fixing test for createGenerateId
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaKrishnaNamburu committed Jul 17, 2021
1 parent 5c8657a commit f7480af
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/jss-plugin-isolate/src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import expect from 'expect.js'
import {create, sheets} from 'jss'

import nested from 'jss-plugin-nested'
import isolate from './index'
import isolate from '.'

describe('jss-plugin-isolate', () => {
let jss
Expand Down
8 changes: 4 additions & 4 deletions packages/jss/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"jss.js": {
"bundled": 63661,
"bundled": 63710,
"minified": 23308,
"gzipped": 7131
},
"jss.min.js": {
"bundled": 62274,
"bundled": 62323,
"minified": 22543,
"gzipped": 6771
},
"jss.cjs.js": {
"bundled": 59388,
"bundled": 59435,
"minified": 26209,
"gzipped": 7211
},
"jss.esm.mjs": {
"bundled": 57800,
"bundled": 57847,
"minified": 24937,
"gzipped": 7040,
"treeshaked": {
Expand Down
3 changes: 2 additions & 1 deletion packages/jss/src/RuleList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow
import createRule from './utils/createRule'
import {StyleRule, KeyframesRule} from './plugins'
/* eslint-disable-next-line import/no-cycle */
import {StyleRule, KeyframesRule} from './plugins/index'
import type {
RuleListOptions,
ToCssOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/jss/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface MinimalObservable<T> {
): {unsubscribe: () => void}
}

type Func<P, T, R> = T extends undefined ? ((data: P) => R) : ((data: P & {theme: T}) => R)
type Func<P, T, R> = T extends undefined ? (data: P) => R : (data: P & {theme: T}) => R

type NormalCssProperties = CSSProperties<string | number>
type NormalCssValues<K> = K extends keyof NormalCssProperties ? NormalCssProperties[K] : JssValue
Expand Down
1 change: 1 addition & 0 deletions packages/jss/src/plugins/conditionalRule.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @flow
/* eslint-disable-next-line import/no-cycle */
import RuleList from '../RuleList'
import type {CSSMediaRule, Rule, RuleOptions, ToCssOptions, JssStyle, ContainerRule} from '../types'

Expand Down
3 changes: 3 additions & 0 deletions packages/jss/src/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// @flow
/* eslint-disable-next-line import/no-cycle */
import pluginStyleRule, {StyleRule} from './styleRule'
/* eslint-disable-next-line import/no-cycle */
import pluginConditionalRule, {ConditionalRule} from './conditionalRule'
/* eslint-disable-next-line import/no-cycle */
import pluginKeyframesRule, {KeyframesRule} from './keyframesRule'
import pluginKeyframeRule, {KeyframeRule} from './keyframeRule'
import pluginFontFaceRule, {FontFaceRule} from './fontFaceRule'
Expand Down
1 change: 1 addition & 0 deletions packages/jss/src/plugins/keyframesRule.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import warning from 'tiny-warning'
/* eslint-disable-next-line import/no-cycle */
import RuleList from '../RuleList'
import type {
CSSKeyframesRule,
Expand Down
2 changes: 1 addition & 1 deletion packages/jss/tests/unit/createGenerateId.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const sheetMock = {

describe('Unit: jss - createGenerateId', () => {
beforeEach(() => {
resetModuleId()
resetSheets()
resetModuleId()
})

it('should return a function', () => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const fs = require('fs')
const path = require('path')
const log = require('npmlog/log')

const lerna = require('../lerna')
const lerna = require('../lerna.json')
const {CHANGELOG_FILENAME} = require('./constants')

const changelogPath = path.join(process.cwd(), CHANGELOG_FILENAME)
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {sheets as defaultSheets} from '../packages/jss/src'
import {setVersion} from '../packages/jss/src/utils/moduleId'

export function resetModuleId() {
setVersion(-1)
setVersion(0)
}

export function resetSheets(sheets = defaultSheets) {
Expand Down

0 comments on commit f7480af

Please sign in to comment.