From ae3ff6f34bfc70625ec4699901ed580fb86e0bcd Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Tue, 1 Nov 2022 17:48:39 +0800 Subject: [PATCH] Add test case --- packages/content-handler/src/index.ts | 2 + .../test/data/tomasz-tunguz-newsletter.html | 88 +++++++++++++++++++ .../content-handler/test/newsletter.test.ts | 11 +++ 3 files changed, 101 insertions(+) create mode 100644 packages/content-handler/test/data/tomasz-tunguz-newsletter.html diff --git a/packages/content-handler/src/index.ts b/packages/content-handler/src/index.ts index 052642a50..ce61c0a64 100644 --- a/packages/content-handler/src/index.ts +++ b/packages/content-handler/src/index.ts @@ -27,6 +27,7 @@ import { RevueHandler } from './newsletters/revue-handler' import { GhostHandler } from './newsletters/ghost-handler' import { parseHTML } from 'linkedom' import { CooperPressHandler } from './newsletters/cooper-press-handler' +import { HeyWorldHandler } from './newsletters/hey-world-handler' const validateUrlString = (url: string) => { const u = new URL(url) @@ -75,6 +76,7 @@ const newsletterHandlers: ContentHandler[] = [ new RevueHandler(), new GhostHandler(), new CooperPressHandler(), + new HeyWorldHandler(), ] export const preHandleContent = async ( diff --git a/packages/content-handler/test/data/tomasz-tunguz-newsletter.html b/packages/content-handler/test/data/tomasz-tunguz-newsletter.html new file mode 100644 index 000000000..68c35fb17 --- /dev/null +++ b/packages/content-handler/test/data/tomasz-tunguz-newsletter.html @@ -0,0 +1,88 @@ +


---------- Forwarded message ---------
From: Tomasz Tunguz <blog@tomtunguz.com>
Date: Fri, 28 Oct 2022 at 19:15
Subject: Grey Skies in Cloud Earnings
To: <martin@doversten.se>


+ + + + + +
+
+ + +
+
+

Tomasz Tunguz

+

Venture Capitalist at Redpoint

+
+
+

If you were forwarded this newsletter, and you'd like to receive it in the future, subscribe here.

+

Grey Skies in Cloud Earnings

+

+

+

I’m watching public company earnings to identify early weaknesses in the software market. This week Microsoft, Google/ Alphabet, & Amazon reported their third quarter figures.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CompanyQ-4 CAGRQ-4 CAGRQ-3 CAGRQ-2 CAGRQ-1 CAGRQ0 CAGR
Microsoft Azure50%51%46%46%40%35%
Google Cloud Platform46%54%45%51%35%38%
Amazon Web Services37%39%40%40%33%27%
+

The meaningful decline in growth rates started four quarters ago is hard to ignore.

+

image + Let’s put these figures into context. Infrastructure revenue growth averaged 33% this quarter, which is astounding considering we’re talking about businesses that sum to more than $50b of revenue per quarter.

+

Customers spent $12b more this quarter - an astounding figure. At a 7x multiple of revenue, that is another $84b of market cap creation, in theory.

+

But, the change in slope is meaningful, too. A year ago, these business units grew at 44% annually. The current recession is evident in the charts: growth rates have declined by 25% in six months’ time.

+

The kink downwards in the red line at Q-2 shows a sudden deceleration in AWS’ growth rate. GCP is more volatile, likely driven by the volatility of bigger deals closing on a smaller revenue base. Meanwhile, Azure has declined in a more steady cadence.

+

The data suggests a broader slowdown in software spending as these companies are indices of software buyers’ behavior.

+

Public software multiples - 4.9x as of last week, not far from the decade low of 3.3x - should depress further given these results & forward guidance. Microsoft stock is down 10%; Amazon fell about 20%; Google about 12%.

+

Lopping another 15% off multiples implies the median software company should trade at 4.2x forward revenues, a far cry from the 15x we observed not twelve months ago.

+ + +

+
+
+
+

If you didn’t enjoy the email you can unsubscribe here.

+

2969 Woodside Road, Woodside, CA 94062

+
+ +
+ + +
+ +
diff --git a/packages/content-handler/test/newsletter.test.ts b/packages/content-handler/test/newsletter.test.ts index b0b28fa37..481abd982 100644 --- a/packages/content-handler/test/newsletter.test.ts +++ b/packages/content-handler/test/newsletter.test.ts @@ -235,6 +235,17 @@ describe('Newsletter email test', () => { }) expect(handler).to.be.instanceOf(HeyWorldHandler) }) + + it('returns ConvertkitHandler for Tomasz Tunguz newsletter', async () => { + const html = load('./test/data/tomasz-tunguz-newsletter.html') + const handler = await getNewsletterHandler({ + html, + postHeader: '', + from: '', + unSubHeader: '', + }) + expect(handler).to.be.instanceOf(ConvertkitHandler) + }) }) describe('findNewsletterUrl', async () => {