@blockquote/create-wc 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockquote/create-wc",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -27,8 +27,8 @@
27
27
  "trailingComma": "all"
28
28
  },
29
29
  "scripts": {
30
- "format": "eslint \"{src,define,test}/**/*.{js,ts,json,html}\" \"index.*\" . --fix --ignore-path .gitignore && prettier \"**/*.{js,ts,json,html,md}\" --write --ignore-path .gitignore",
31
- "lint": "eslint \"{src,define,test}/**/*.{js,ts,json,html}\" \"index.*\" . --ignore-path .gitignore && prettier \"**/*.{js,ts,json,html,md}\" --check --ignore-path .gitignore"
30
+ "format": "eslint \"{src,define,test}/**/*.{js,ts,json,html}\" \"index.*\" --fix --ignore-path .gitignore && prettier \"**/*.{js,ts,json,html,md}\" --write --ignore-path .gitignore",
31
+ "lint": "eslint \"{src,define,test}/**/*.{js,ts,json,html}\" \"index.*\" --ignore-path .gitignore && prettier \"**/*.{js,ts,json,html,md}\" --check --ignore-path .gitignore"
32
32
  },
33
33
  "devDependencies": {
34
34
  "eslint": "^8.0.0",
@@ -13,6 +13,7 @@
13
13
  ## testing
14
14
  /coverage/
15
15
  **/coverage/
16
+ /reports/
16
17
  __snapshots__
17
18
 
18
19
  ## temp folders
@@ -33,4 +34,4 @@ storybook-static
33
34
  /packages/*/build
34
35
  /packages/*/node_modules
35
36
  /packages/*/.editorconfig
36
- /packages/*/.gitignore
37
+ /packages/*/.gitignore
@@ -38,7 +38,10 @@
38
38
  "rollup-plugin-summary": "^1.3.0",
39
39
  "rollup-plugin-minify-html-literals": "^1.2.6",
40
40
  "tiny-array-flat-polyfill": "^0.2.1",
41
- "vite": "^2.7.0-beta.8",
41
+ "vite": "^2.7.0",
42
42
  "sort-package-json": "^1.52.0"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
43
46
  }
44
47
  }
@@ -36,6 +36,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
36
36
  testFramework: {
37
37
  config: {
38
38
  ui: 'tdd',
39
+ timeout: 4000,
39
40
  },
40
41
  },
41
42
 
@@ -9,22 +9,22 @@ suite('<%= className %>', () => {
9
9
 
10
10
  suite('Default', () => {
11
11
  setup(async () => {
12
- el = await fixture(html` <<%= tagName %>></<%= tagName %>> `);
12
+ el = await fixture(html` <<%= tagName %>>light-dom</<%= tagName %>> `);
13
13
  await el.updateComplete;
14
14
  });
15
15
 
16
- test('has a default heading "Hey there" and counter 5', async () => {
16
+ test('has a default heading "Hey there" and counter 5', () => {
17
17
  assert.equal(el.heading, 'Hey there');
18
18
  assert.equal(el.counter, 5);
19
19
  });
20
20
 
21
21
  suite('Semantic Dom and a11y', () => {
22
- test('SHADOW DOM - Structure test', () => {
23
- assert.shadowDom.equalSnapshot(el, { ignoreAttributes: ['id'] });
22
+ test('SHADOW DOM - Structure test', async () => {
23
+ await assert.shadowDom.equalSnapshot(el, { ignoreAttributes: ['id'] });
24
24
  });
25
25
 
26
- test('LIGHT DOM - Structure test', () => {
27
- assert.lightDom.equalSnapshot(el, { ignoreAttributes: ['id'] });
26
+ test('LIGHT DOM - Structure test', async () => {
27
+ await assert.lightDom.equalSnapshot(el, { ignoreAttributes: ['id'] });
28
28
  });
29
29
  test('a11y', async () => {
30
30
  await assert.isAccessible(el);
@@ -38,7 +38,7 @@ suite('<%= className %>', () => {
38
38
  await el.updateComplete;
39
39
  });
40
40
 
41
- test('increases the counter on button click', async () => {
41
+ test('increases the counter on button click', () => {
42
42
  el.shadowRoot.querySelector('button').click();
43
43
  assert.equal(el.counter, 6);
44
44
  });
@@ -50,7 +50,7 @@ suite('<%= className %>', () => {
50
50
  await el.updateComplete;
51
51
  });
52
52
 
53
- test('can override the heading via attribute', async () => {
53
+ test('can override the heading via attribute', () => {
54
54
  assert.equal(el.heading, 'attribute heading');
55
55
  });
56
56
  });
@@ -11,22 +11,22 @@ suite('<%= className %>', () => {
11
11
 
12
12
  suite('Default', () => {
13
13
  setup(async () => {
14
- el = (await fixture(html` <<%= tagName %>></<%= tagName %>> `)) as <%= className %>;
14
+ el = (await fixture(html` <<%= tagName %>>light-dom</<%= tagName %>> `)) as <%= className %>;
15
15
  await el.updateComplete;
16
16
  });
17
17
 
18
- test('has a default heading "Hey there" and counter 5', async () => {
18
+ test('has a default heading "Hey there" and counter 5', () => {
19
19
  assert.equal(el.heading, 'Hey there');
20
20
  assert.equal(el.counter, 5);
21
21
  });
22
22
 
23
23
  suite('Semantic Dom and a11y', () => {
24
- test('SHADOW DOM - Structure test', () => {
25
- assert.shadowDom.equalSnapshot(el);
24
+ test('SHADOW DOM - Structure test', async () => {
25
+ await assert.shadowDom.equalSnapshot(el);
26
26
  });
27
27
 
28
- test('LIGHT DOM - Structure test', () => {
29
- assert.lightDom.equalSnapshot(el);
28
+ test('LIGHT DOM - Structure test', async () => {
29
+ await assert.lightDom.equalSnapshot(el);
30
30
  });
31
31
  test('a11y', async () => {
32
32
  await assert.isAccessible(el);
@@ -40,7 +40,7 @@ suite('<%= className %>', () => {
40
40
  await el.updateComplete;
41
41
  });
42
42
 
43
- test('increases the counter on button click', async () => {
43
+ test('increases the counter on button click', () => {
44
44
  const button = el.shadowRoot!.querySelector('button')!;
45
45
  button.click();
46
46
  assert.equal(el.counter, 6);
@@ -55,7 +55,7 @@ suite('<%= className %>', () => {
55
55
  await el.updateComplete;
56
56
  });
57
57
 
58
- test('can override the heading via attribute', async () => {
58
+ test('can override the heading via attribute', () => {
59
59
  assert.equal(el.heading, 'attribute heading');
60
60
  });
61
61
  });
@@ -1,67 +0,0 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
-
3
- // import { playwrightLauncher } from '@web/test-runner-playwright';
4
- import { defaultReporter } from '@web/test-runner';
5
- import { mochaStyleReporter } from '@blockquote/test-runner-mocha-style-reporter';
6
-
7
- const filteredLogs = ['in dev mode'];
8
-
9
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
10
- /** Test files to run */
11
- files: 'test/**/*.test.js',
12
-
13
- /** Resolve bare module imports */
14
- nodeResolve: {
15
- exportConditions: ['browser', 'development'],
16
- },
17
-
18
- reporters: [
19
- defaultReporter(),
20
- mochaStyleReporter(),
21
- ],
22
-
23
- coverageConfig: {
24
- report: true,
25
- reportDir: 'test/coverage',
26
- threshold: {
27
- statements: 80,
28
- branches: 80,
29
- functions: 80,
30
- lines: 80,
31
- },
32
- },
33
-
34
- testFramework: {
35
- config: {
36
- ui: 'tdd',
37
- },
38
- },
39
-
40
- /** Filter out lit dev mode logs */
41
- filterBrowserLogs(log) {
42
- for (const arg of log.args) {
43
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
44
- return false;
45
- }
46
- }
47
- return true;
48
- },
49
-
50
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
51
- // esbuildTarget: 'auto',
52
-
53
- /** Amount of browsers to run concurrently */
54
- // concurrentBrowsers: 2,
55
-
56
- /** Amount of test files per browser to test concurrently */
57
- // concurrency: 1,
58
-
59
- /** Browsers to run tests on */
60
- // browsers: [
61
- // playwrightLauncher({ product: 'chromium' }),
62
- // playwrightLauncher({ product: 'firefox' }),
63
- // playwrightLauncher({ product: 'webkit' }),
64
- // ],
65
-
66
- // See documentation for all available options
67
- });
@@ -1,67 +0,0 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
-
3
- // import { playwrightLauncher } from '@web/test-runner-playwright';
4
- import { defaultReporter } from '@web/test-runner';
5
- import { mochaStyleReporter } from '@blockquote/test-runner-mocha-style-reporter';
6
-
7
- const filteredLogs = ['in dev mode'];
8
-
9
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
10
- /** Test files to run */
11
- files: 'dist/test/**/*.test.js',
12
-
13
- /** Resolve bare module imports */
14
- nodeResolve: {
15
- exportConditions: ['browser', 'development'],
16
- },
17
-
18
- reporters: [
19
- defaultReporter(),
20
- mochaStyleReporter(),
21
- ],
22
-
23
- coverageConfig: {
24
- report: true,
25
- reportDir: 'dist/test/coverage',
26
- threshold: {
27
- statements: 80,
28
- branches: 80,
29
- functions: 80,
30
- lines: 80,
31
- },
32
- },
33
-
34
- testFramework: {
35
- config: {
36
- ui: 'tdd',
37
- },
38
- },
39
-
40
- /** Filter out lit dev mode logs */
41
- filterBrowserLogs(log) {
42
- for (const arg of log.args) {
43
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
44
- return false;
45
- }
46
- }
47
- return true;
48
- },
49
-
50
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
51
- // esbuildTarget: 'auto',
52
-
53
- /** Amount of browsers to run concurrently */
54
- // concurrentBrowsers: 2,
55
-
56
- /** Amount of test files per browser to test concurrently */
57
- // concurrency: 1,
58
-
59
- /** Browsers to run tests on */
60
- // browsers: [
61
- // playwrightLauncher({ product: 'chromium' }),
62
- // playwrightLauncher({ product: 'firefox' }),
63
- // playwrightLauncher({ product: 'webkit' }),
64
- // ],
65
-
66
- // See documentation for all available options
67
- });