From $^{\prime\prime}$Tensor Calculus$^{\prime\prime}$ by J.L.Synge-A.Schild, Dover Edition 1978 :
1.6. Tests for tensor character. The direct test for the
tensor character of a set of quantities is this: see whether the
components obey the law of tensor transformation when the
coordinates are changed. However, it is sometimes much more
convenient to proceed indirectly as follows.
Suppose that $\,A_{r}\,$ is a set of quantities which we wish to test
for tensor character. Let $\,X^{r}\,$ be the components of an arbitrary contravariant tensor of the first order. We shall now prove that if the inner product $\,A_{r}X^{r}\,$ is an invariant, then $\,A_{r}\,$ are the components of a covariant tensor of the first order. We have, by the given invariance,
\begin{equation}
A_{r}X^{r}\boldsymbol{=}A^{\prime}_{r}X^{\prime\, r}
\tag{1.601.}\label{1.601.}
\end{equation}
and, by the law of tensor transformation,
\begin{equation}
X^{\prime\, r}\boldsymbol{=}X^{s}\dfrac{\partial x^{\prime\, r}}{\partial x^{s}}
\tag{1.602.}\label{1.602.}
\end{equation}
Substituting this in the right-hand side of \eqref{1.601.}, rearranging, and making a simple change in notation, we have
\begin{equation}
\left(A_{s}\boldsymbol{-}A^{\prime}_{r}\dfrac{\partial x^{\prime\, r}}{\partial x^{s}}\right)X^{s}\boldsymbol{=}0
\tag{1.603.}\label{1.603.}
\end{equation}
Since the quantities $\,X^{s}\,$ are arbitrary, the quantity inside the parentheses vanishes; this establishes the tensor character of
$\,A_{r}\,$, by \eqref{1.402.}
$\boldsymbol{=\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!=}$
A set of quantities $\,T_{r}\,$ are said to be the components of a covariant vector if they transform according to the equation
\begin{equation}
T_{r}\boldsymbol{=}T_{s}\dfrac{\partial x^{s}}{\partial x^{\prime\, r}}
\tag{1.402.}\label{1.402.}
\end{equation}