Skip to content

Commit

Permalink
chore(icons): update packages (#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfellerph authored Oct 27, 2023
1 parent fba0a91 commit 5b5852a
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 1,018 deletions.
12 changes: 6 additions & 6 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@
},
"devDependencies": {
"@tsconfig/node18": "18.2.2",
"@types/jest": "26.0.24",
"@types/mock-fs": "4.13.1",
"@types/jest": "29.5.6",
"@types/mock-fs": "4.13.3",
"@types/node": "18.18.0",
"@types/node-fetch": "2.6.6",
"@types/node-fetch": "2.6.7",
"dotenv": "16.3.1",
"http-server": "14.1.1",
"https-proxy-agent": "7.0.2",
"jest": "26.6.3",
"jest": "29.7.0",
"mock-fs": "5.2.0",
"node-fetch": "2.7.0",
"svgo": "3.0.2",
"ts-jest": "26.5.6",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.2.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`downloadSVG should download an svg icon 1`] = `
"<svg><g id=\\"icon\\">
<path d=\\"M16 8.4 3.467 20.8z\\"/>
"<svg><g id="icon">
<path d="M16 8.4 3.467 20.8z"/>
</g></svg>
"
`;
102 changes: 51 additions & 51 deletions packages/icons/src/utilities/__snapshots__/mapResponse.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`mapResponse Should map the result object to a meaningful data structure 1`] = `
Array [
Object {
[
{
"createdAt": 2017-11-10T09:43:19.000Z,
"file": Object {
"file": {
"basename": "1000",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1000.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 0,
"width": 0,
},
},
"id": 352084,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352084/storage/MzU0NzA1LzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Briefeinwurf",
"Brief",
"Kuvert",
Expand Down Expand Up @@ -62,24 +62,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "95965510-c5fb-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1001",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1001.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 0,
"width": 0,
},
},
"id": 352086,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352086/storage/MzU0NzA2LzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Brief",
"Briefaufgabe",
"Kuvert",
Expand Down Expand Up @@ -110,24 +110,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "8676c2d0-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1002",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1002.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352087,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352087/storage/MzU0NzA3LzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"PostCard Creator",
"Postkarte",
"Karte",
Expand All @@ -154,24 +154,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "867c1a00-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1003",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1003.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352088,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352088/storage/MzU0NzA4LzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Gratis Poskarte",
"Geschenkskarte",
"Postkarte",
Expand Down Expand Up @@ -216,24 +216,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "86819840-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1004",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1004.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352089,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352089/storage/MzU0NzA5LzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Brief/Paket",
"Brief",
"Paket",
Expand Down Expand Up @@ -298,24 +298,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "86862c20-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1005",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1005.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352090,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352090/storage/MzU0NzEwLzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Paket",
"Paketaufgabe",
"Geschenk",
Expand Down Expand Up @@ -360,24 +360,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "868b3530-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1006",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1006.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352091,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352091/storage/MzU0NzExLzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"My Post 24",
"Paket",
"24h",
Expand Down Expand Up @@ -422,24 +422,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "868fc910-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1007",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1007.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352092,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352092/storage/MzU0NzEyLzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Zustellservice",
"Zusteller",
"Paket",
Expand Down Expand Up @@ -502,24 +502,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "869435e0-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1008",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1008.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352093,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352093/storage/MzU0NzEzLzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Briefzentrum",
"Zustellung",
"Zuhause",
Expand Down Expand Up @@ -549,24 +549,24 @@ Array [
"typeFilter": "pictograms",
"uuid": "869917e0-c5fc-11e7-a943-005056a94f4a",
},
Object {
{
"createdAt": 2017-11-10T09:50:05.000Z,
"file": Object {
"file": {
"basename": "1009",
"ext": ".svg",
"mime": "image/svg+xml",
"name": "1009.svg",
"size": Object {
"size": {
"dpi": 72,
"height": 32,
"width": 32,
},
},
"id": 352094,
"meta": Object {
"meta": {
"businessfield": "kommunikation",
"downloadLink": "https://cdn.post.ch/hcms/v2.0/entity/asset/352094/storage/MzU0NzE0LzAvbWFzdGVy",
"keywords": Array [
"keywords": [
"Paketzentrum",
"Zustellung",
"Zuhause",
Expand Down
16 changes: 6 additions & 10 deletions packages/icons/src/utilities/downloadSVG.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { mocked } from 'ts-jest/utils';
import fetch, { Response } from 'node-fetch';
import { Businessfield, Type, TypeFilter, VariantMIME } from '../models/censhare-result-page.model';
import mockFs from 'mock-fs';
Expand All @@ -13,7 +12,7 @@ describe('downloadSVG', () => {
[outputPath]: {},
});

mocked(fetch).mockImplementationOnce(() =>
jest.mocked(fetch).mockImplementationOnce(() =>
Promise.resolve({
text: () => Promise.resolve('<svg><path d="M16 8.4l-12.533 12.4z"></path></svg>'),
} as Response),
Expand All @@ -28,11 +27,8 @@ describe('downloadSVG', () => {
meta: {
downloadLink: '/test',
businessfield: Businessfield.Kommunikation,
keywords: [
'Test',
'Test2',
],
year: ''
keywords: ['Test', 'Test2'],
year: '',
},
file: {
mime: VariantMIME.ImageSVGXML,
Expand All @@ -42,11 +38,11 @@ describe('downloadSVG', () => {
size: {
width: 32,
dpi: 72,
height: 32
}
height: 32,
},
},
createdAt: new Date(),
modifiedAt: new Date()
modifiedAt: new Date(),
},
outputPath,
);
Expand Down
Loading

0 comments on commit 5b5852a

Please sign in to comment.