I am following the video lectures series by Prof. V. Balakrishnan on complex analysis.
He considers a function $f(z) = u(x,y)+i v(x,y)$ which is not necessarily analytic. Then lets $\delta h = \epsilon \,e^{i \alpha}$ denote some small distance at an arbitrary angle $\alpha$.
He then goes on to write:
$$ \frac{f(z + \delta h)}{\delta h} = e^{-i \alpha} \bigl (\frac{du}{dx} \cos(\alpha) + i \frac{du}{dy}\sin(\alpha) + i \bigl [ \frac{dv}{dx} \cos(\alpha) + i \frac{dv}{dy} sin(\alpha) \bigr ]\bigr )$$
And argues that the Cauchy-Riemann are satisfied if and only if the above expression is independent of $\alpha$.
The only thing that I can think he must have done is use a sort of "chain rule":
$$ \frac{df}{\delta h} = \frac{df}{dx} \frac{dx}{\delta h} + \frac{df}{dy} \frac{d(iy)}{\delta h}$$
where:
$$ \frac{dx}{\delta h} = \frac{(x + \epsilon cos(\alpha)) - x}{\delta h} = e^{-i\alpha} \cos(\alpha)$$
and:
$$ \frac{d(iy)}{\delta h} = \frac{(iy + \epsilon i \sin(\alpha)) - iy}{\delta h} = e^{-i\alpha} i\sin(\alpha)$$
Can you really do that? Does it even make sense?
He doesn't write that. But I'm not sure what he does write is correct either. What it should be (or what I'll vouch for, anyway), is $$\frac{f(z+\delta h)-f(z)}{\delta h} = e^{-i\alpha}[\partial_xu\cos\alpha + \partial_yu\sin\alpha +i(\partial_xv\cos\alpha+\partial_yv\sin\alpha)]\\=e^{-i\alpha}[\partial_xu\cos\alpha+i\partial_yv\sin\alpha + i(\partial_xv\cos\alpha-i\partial_yu\sin\alpha)]$$ which we can see is independent of $\alpha$ if $\partial_xu=\partial_y v$ and $\partial_xv=-\partial_y u.$
The numerator is a first order Taylor expansion in $x$ and $y$, of the form $$ f(x+\delta x,y+\delta y) = f(x,y)+ \partial_xf \delta x + \partial_yf\delta y.$$ where you plug in $\delta x=\epsilon\cos\alpha$ and $\delta y=\epsilon \sin\alpha.$